3830TextAnswersCh6

3830TextAnswersCh6 - Chapter Six Transforming Data Models...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter Six Transforming Data Models Into Database Designs Page 6-1 ANSWERS TO REVIEW QUESTIONS 6.1 Identify the three major tasks for transforming a data model into a database design. (1) Replacing entities and attributes with tables and columns. (2) Representing relationships and maximum cardinalities by use of foreign keys. (3) Representing minimum cardinalities by defined actions to constrain the values of primary and foreign keys. 6.2 What is the relationship between entities and tables? Between attributes and columns? When transforming a data model into a database design we create a table for each entity in the database design and a column for each attribute in the database design. 6.3 Why is the choice of the primary key important? The choice of a primary key is important because: (1) The DBMS will use the primary key to facilitate searching and sorting of table rows. (2) Some DBMSs use the primary key to organize table storage. (3) Most DBMS products create indexes and other data structures using the value of the primary key. 6.4 What are the three characteristics of an ideal primary key? The three characteristics of an ideal primary key are short, numeric and fixed. 6.5 What is a surrogate key? What are its advantages A surrogate key is a unique, DBMS-supplied identifier used as the primary key of a relation. Its advantages are: (1) They are unique within the table and never change. (2) They are assigned when the row is created, and destroyed when the row is deleted. (3) It is an ideal primary key -- short, numeric and fixed. 6.6 When should you use a surrogate key? A surrogate key is used when a table does not have a unique key, or when a unique key is too long, non-numeric and may change. 6.7 Describe two disadvantages of surrogate keys. First, foreign keys that are based on surrogate keys have no meaning to the users. The second disadvantage of surrogate keys arises when data is shared among different databases. It is possible for two different SALE_ORDER rows, in two different databases, to have the same value of ID. 6.8 What is the difference between an alternate key and a candidate key? There is no difference between an alternate key and a candidate key – the terms are synonymous.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapter Six Transforming Data Models Into Database Designs Page 6-2 6.9 What does the notation LastName (AK2.2) mean? The notation LastName (AK2.2) means that LastName is the second column in a composite alternate key. 6.10 Name four column properties. Four column properties are: null status, data type, default value, and data constraints. 6.11 Explain why primary keys may never be null, but alternate keys can be null. Primary keys can never be null since each row must have a unique identifier. Alternate keys can be null because one use of designating a column as an alternative key is simply to guarantee uniqueness of populated fields. Thus the value of an alternative key can be NULL, but if it has a value then the value must be unique. 6.12
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/13/2009 for the course CS CS31 taught by Professor Camillo during the Spring '09 term at Grantham.

Page1 / 15

3830TextAnswersCh6 - Chapter Six Transforming Data Models...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online