CST363 - Week 2

 CST363 Week 2 Learning Journal

SQL has the flexibility to join tables on any column(s) using any predicate (=, >, < ). Most of the time the join will use equality between a primary and foreign key. Think of example where joining on something other than keys would be needed.  Write the query both as an English sentence and in SQL. If you can't think of your own example, search the textbook or internet for an example.

Compare the prices between a digital product and a physical product.

create table digi_product

(key varchar(20),
price varchar(15),
name varchar(20),

provider varchar(20),

size numeric(10,2)
primary key (key)
);

create table phys_product

 (key varchar(20),
price varchar(15),
name varchar(20),

store_location varchar(20)

shipping numeric(10,2)
primary key (key)

);

What is your opinion of SQL as a language?  Do you think it is easy to learn and use?  When translating from an English question to SQL, what kinds of questions do you find most challenging?

SQL is an easy language to learn, but it can get confusing with some syntax that is similar, but produces different results than a different syntax. I found that the 'WHERE' and 'ON' syntax can get confusing. The most challenging questions were the ones that asked me to provide data that included null values.

 

Comments

Popular posts from this blog

CST300 - Week 4

CST300 - Week 2

CST300 - Week 5