Question Two 2. Using the following relations to write SQL statement that follow
ID: 3824323 • Letter: Q
Question
Question Two
2. Using the following relations to write SQL statement that follows:
Product (product_name, price, category, company_name)
Company (company_name, stockPrice, country)
a- Find all products produced by USA and have a price greater than 500.
b- Find the Categories that a product might belong to. Make sure that the category is not repeated and it is listed in ascending order.
c- delete all products with that belong to SONY company.
Question Three
3.a List the three design goals for relational databases, and explain why each is desirable.
3.b What is the result of an arithmetic expression involving nulls, for instance, what 7 + null would return?
Suppose you want to store the following information: Student id Course Mark 111 Maths 78 Physics 90 222 Biology 89 333 Physics 60 333 Chemistry 75 1.a Is this table in first normal form? Why or Why Not? l.b Why it is not in 2NF? How you can change the above table into 2NFExplanation / Answer
1(a)
The rule of first Normal form is no two Rows of data must contain repeating group of information i.e each set of column must have a unique value, such that multiple columns cannot be used to fetch the same row.
In 1 NF , no column should have more than one value.
So Yes, the table if first normal form.
1(b)
As per the Second Normal Form there must not be any partial dependency of any column on primary key. It means that for a table that has concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence. If any column depends only on one part of the concatenated key, then the table fails Second normal form.
So the able table can be changed to 2 NF if it cover in this way.
Student, Cource -> Student table
Student, Marks -> Marks Table
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.