2nd Week in 363 Database Management
- 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.
I found the example in the last homework problem that required to look at two tables and get two different years with two different semesters. I had to create two temp tables one to hold Fall semester and year 2009 values and another table to hold Spring semester and year 2010 values. I had two join them on the course ID that both had in course id in common.
- 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?
I thought it would be easy to learn but I am finding myself getting challenged in a lot of the homework problem and spending up to one hour to complete some of the problems. It requires thinking and using logic on some of the problems. When translating from English to SQL I find questions that require to join tables and place conditions on what values to return specially with counting and grouping.
Comments
Post a Comment