Download presentation
Presentation is loading. Please wait.
Published byMargery Whitehead Modified over 9 years ago
1
Copyright © 2011 by Michael V. Mannino All rights reserved. Database Design, Application Development, and Administration, 5 th Edition Quiz G4 Hyunwoo Choi Xiaobin Lin
2
Chapter 3: The Relational Data ModelSlide 2 1. a Order is not matter Each row is a unique Primary key and foreign key
3
Chapter 3: The Relational Data ModelSlide 3 2. d CREATE TABLE Enrollment ( OfferNoINTEGER, StdNoCHAR(11), EnrGradeDECIMAL(3,2), CONSTRAINT PKEnrollment PRIMARY KEY(OfferNo, StdNo), CONSTRAINT FKOfferNo FOREIGN KEY (OfferNo) REFERENCES Offering ON UPDATE CASCADE, CONSTRAINT FKStdNo FOREIGN KEY (StdNo) REFERENCES Student ON UPDATE CASCADE )
4
Chapter 3: The Relational Data ModelSlide 4 3. Which of the following constraints are enforced by a relational data model? a. A value stored in a column within a row is atomic. b. Values in a primary key column are unique. c. Values in a foreign key column are subsets of values in a referenced column. d. All of the above.
5
Chapter 3: The Relational Data ModelSlide 5 4. Mark True or False: a. The referential integrity rule ensures that people, things and events are uniquely identified in a database. False b. A primary key can not be a superkey False
6
Chapter 3: The Relational Data ModelSlide 6 4. c. A superkey may be designated to be a primary key. True d. Each operator of relational algebra transforms one or more tables into a new table. True e. Any attribute, whose values are unique in current relational database state, is a candidate key. False
7
Chapter 3: The Relational Data ModelSlide 7 5. a, between 0 and M*N Special case: no match in the columns we are joining
8
Chapter 3: The Relational Data ModelSlide 8 6. d, between 0 and M*N Special case: the rows from N matches all the rows from M
9
Chapter 3: The Relational Data ModelSlide 9 7. B Table A does not have valid column ID Table C, D are not atomic Table E contains two values in one cell
10
Chapter 3: The Relational Data ModelSlide 10 8. Entity integrity Entity integrity: primary keys Each table has column(s) with unique values Ensures entities are traceable So that every rows in a table can be accessed via a unique ID.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.