Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quiz 2. 1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a.

Similar presentations


Presentation on theme: "Quiz 2. 1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a."— Presentation transcript:

1 Quiz 2

2 1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a primary key There is a foreign key 2.A foreign key is indicated in SQL in part with the use of the following keywords in a CREATE statement: UNIQUE NOT NULL PRIMARY KEY REFERENCES Answers

3 1. Rows are not ordered and There is a foreign key

4 3.Which of the following constraints are enforced by a relational data model? A value stored in a column within a row is atomic. Values in a primary key column are unique. Values in a foreign key column are subsets of values in a referenced column. All of the above. 4. Ture or False (a) False: The entity integrity rule ensures that people, things and events are uniquely identified in a database. (b) False: Primary key is subset of superkey but vice versa not true. (c) True: as b (d) True (e) False: The values must be unique for all cases including the new future cases Answers

5 4 (d) False: after projection we may have same rows and that is not a table (e)True: For now it’s a candidate key.

6 5.The inner join of a table of N rows and a table of M rows (M <= N) has the following number of rows: A number between 0 and M + N A number in the range 0 to M*N A number between M + N and M * N A number between M and M * N If there is no single match between then it’s zero. For the most, it should be cross product M*N 6. The full outer join of a table of N rows and a table of M rows (M <= N) has the following number of rows: A number between 0 and M + N A number in the range 0 to M*N A number between M + N and M * N A number between M and M * N (?) Since N>=M, then at least the new table contains N rows and up to M*N rows

7 7. Which of the following pictures represents a relational table? B a : not a relational table since we can’t find primary key. b : It’s a relational table. c : not a relational table since it has two same rows d : not a table since it’s last column is non-atomic. e : not a table since the last column’s non-atomic(A,I). 8. What is the motivation for the entity integrity rule? Entity integrity ensures that entities (people, things, and events) are uniquely identified in a database. For auditing, security, and communication reasons, it is important that business entities be easily traceable. (From textbook)


Download ppt "Quiz 2. 1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a."

Similar presentations


Ads by Google