QUESTION 6 How many tables are created from the E-R diagram in Fig. 3? 6 3 4 5 1
ID: 3728493 • Letter: Q
Question
QUESTION 6
How many tables are created from the E-R diagram in Fig. 3?
6
3
4
5
1 points
QUESTION 7
Consider the following statement:
Alter table employee
Add constraint employee_office_number_fk foreign key(office_number)
References sales_office(office_number);
Which of the following is true for the above statement?
The statement guarantees a unique identifier for the office_number column of the office table.
The statement provides a foreign key constraint for the office_number column of the office table.
The statement provides a foreign key constraint for the office_number column of the employee table
Both b and c are correct
1 points
QUESTION 8
Consider the following statement:
Alter table owns
Add constraint owns_property_owner_id_pk primary key(property,owner_id);
Which of the following is true for the above statement?
The statement is unnecessary because the owns table is not implemented.
Builds composite primary key based on the property and owner_id fields of the owns table.
Is syntactically incorrect – the primary key can only be built on one column
The statement is unnecessary because of the one-to-many relationship between owns and property.
QUESTION 9
Consider that the employee table has the following schema (The desc command displays the columns in the same order as shown below):
Employee(Employee_ID,Employee_name,office_number)
Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram.
What does the following command do? (Assume that no other rows have 1806 as the employee_id)
Insert into employee
Values(1806,”Jim Davis”, NULL);
Correctly inserts a new row into the employee table (no error messages displayed)
Displays an error message (Foreign key constraint violated) but inserts the data anyway
Displays that a NOT NULL constraint (employee_office_number_nn) was violated and does not insert the row.
Displays an error message because no columns of any table are ever allowed to be NULL
QUESTION 10
Consider the following statement:
Delete from owns;
Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram.
Which of the following is true of the above statement:
Correctly deletes all records of owns table (no error message displayed)
Violates foreign key constraints implemented on owns table (error message is displayed) and does not delete any records
Violates rule that you can never delete all records from a table (error message is displayed ) and does not delete any records
None of the above
1 points
QUESTION 11
Consider the following statement:
delete from sales_office;
Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram. Assume all tables are fully populated with data.
Which of the following is true?
Correctly deletes all record of office table (no error message displayed)
Violates foreign key constraint implemented on Employee table
Violates foreign key constraint implemented on Property table
Both b and c are correct
QUESTION 12
Consider the following statement:
Insert into owns
Values(1215,101,50);
Where 1215 represents the property id, 101 is the owner id, and 50 is the percent owned. Which of the following statements is true:
The property id 1215 must be the primary key for a row in the property table
The owner id 101 must be the primary key for a row in the owner table.
The value of 50 must be Not Null
a and b are true
1 points
QUESTION 13
Consider the following statement:
Update owns
Set owner_id = NULL;
Which of the following statements are true?
The Primary key constraint is violated because Primary keys cannot be NULL
Is illegal because no column in a database can ever by NULL
Is illegal because update statements always require a “where” clause
All of the above
a.6
b.3
c.4
d.5
Questions 6-13 Uses the following E-R diagram EMPLOYEE Is, 382 Office SALES OFFICE Location Address City PROPERTY State Locatioa Zip Code Percent OWNERExplanation / Answer
6. c.5
7. c.The statement provides a foreign key constraint for the office_number column of the employee table
8. b.Builds composite primary key based on the property and owner_id fields of the owns table.
9. a.Correctly inserts a new row into the employee table (no error messages displayed)
office_number can be null (foreign key);
10. c.Violates rule that you can never delete all records from a table (error message is displayed ) and does not delete any records
11. a. Correctly deletes all record of office table (no error message displayed)
12. d. a and b are true
Both property id and owner id together will make a composite primary key
13. a. The Primary key constraint is violated because Primary keys cannot be NULL
**Comment for any further queries.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.