Question

In: Computer Science

1. MySQL can enforce referential integrity for a delete operation performed on a parent table record...

1. MySQL can enforce referential integrity for a delete operation performed on a parent table record by ____________________ .

A. returning an error instead of deleting any rows.

B. setting the foreign key values in the related child table rows to null.

C. deleting the related rows in the corresponding child table(s).

D. applying any one of the above, (a, b or c), depending on how the foreign key constraint is defined.

2. Third normal form (3NF) eliminates which of the following issues in a table?

A. Transitive dependencies

B. Functional dependencies

C. Partial dependencies

D. Repeating, or multi-valued columns

3. For a table to be in the second normal form (2NF), each non-primary key column in the table must __________________

A. depend on only one column that is part of the composite primary key of the given table.

B. depend on all columns that make up the composite primary key of the given table.

C. have a unique value.

D. have a non-NULL value.

Solutions

Expert Solution

Answer:

Question 1:  applying any one of the above, (a, b or c), depending on how the foreign key constraint is defined.

  • Referential integrity can be maintained by one of the three rules.
  • if ON DELETE NO ACTION is definied on table then it returns an error instead of deleting any rows.
  • if ON DELETE SET NULL is definied on table then it sets the foreign key values in the related child table rows to null.

  • if ON DELETE CASCADE is definied on table then it deletes the related rows in the corresponding child table.

  • So d will be the answer.

Question 2:   Transitive dependencies

  • 2nd normal form eliminates partial functional dependencies.
  • 3rd normal form eliminates transitive functional dependencies.
  • 4th normal form eliminates prime transitive functional dependencies.

Question 3: depend on all columns that make up the composite primary key of the given table.

  • If a non-primary key column depends on only one column that is part of the composite primary key of the given table then it is called as partial functonal dependency.
  • So to avoid partial functional dependency, a non-key must depend on all columns that make up the composite primary key of the given table.

Related Solutions

QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with...
QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with an example the GROUP BY/HAVING clause
identify at least four examples of how the integrity of the medical record can be violated
identify at least four examples of how the integrity of the medical record can be violated
identify at least four examples of how the integrity of the medical record can be violated
identify at least four examples of how the integrity of the medical record can be violated
1 - The most appropriate procedure an auditor can use to ensure integrity of the sales...
1 - The most appropriate procedure an auditor can use to ensure integrity of the sales and collection cycle is to: a) Confirm accounts receivables balances. b)Ensure the bank reconciliations are prepared by one who also handles sales returns so missing items can be accounted for timely. c)Recalculate the sales list price of all products in the computer files that are accessed by sale personnel. 2 - When performing audit procedures, which of the follow must be set prior to...
the mysql lyrics database is provided below 1.)What is a primary key used for? Can you...
the mysql lyrics database is provided below 1.)What is a primary key used for? Can you give me an example of a primary key in the Lyrics database? 2.)What is the purpose of doing a join between two tables. Ex. Why would I ever want to join the Tracks and Titles tables together? 3.)Why is isolation important in database design? DROP TABLES IF EXISTS Artists,Genre, Members, Titles, Tracks,SalesPeople,Studios,XrefArtistsMembers; DROP TABLES IF EXISTS Authors,Publishers,Titles,Title_Authors,Royalties; DROP TABLES IF EXISTS Products,Customers,Orders,Order_details; DROP TABLES...
Design a database/mysql that has 3 tables: TABLE 1 student: StudID (int), LastName (varchar), FirstName (varchar),...
Design a database/mysql that has 3 tables: TABLE 1 student: StudID (int), LastName (varchar), FirstName (varchar), MiddleName(varchar) TABLE 2 Course: StudID, CourseID TABLE 3 study course: CourseID(int), CourseTitle(varchar), Units(int), PreqCourse(varchar) ** Insert at least 5 records. ** Use the "select" command to view the content of the tables. ** POST THE SCREENSHOT
-Using MySQL Workbench Data Modeler, create three (3) models from the tables below. Show Table 1...
-Using MySQL Workbench Data Modeler, create three (3) models from the tables below. Show Table 1 in 3rd Normal Form. Show Table 2 in 3rd Normal Form. Merge the 3rd Normal Forms of Table 1 and Table 2 into a single 3rd Normal Form model. Note that you only can model table and column names and data types. The data shown is for your reference to determine functional, partial, and transitive dependencies. -Provide a summary of the steps you took...
1.Which of the following is a DML operation on table employee? change an employee's stree address...
1.Which of the following is a DML operation on table employee? change an employee's stree address cancel the insertion of 3 new employees in table employee add a column phone2 to table employee to limit the salary amount to be at most $200,000 add a constraint in table employee to limit the salary amount to be at most $200,000
Use the table to record responses to questions 1 and 2. A. LIPS B. PAROTID DUCK...
Use the table to record responses to questions 1 and 2. A. LIPS B. PAROTID DUCK C.ESOPHAGUS D. FUNGUS OF STOMACH E. BODY STOMACH F. PANCREAS G. DESCENDING COLON H. SMALL INTESTINE I. RECTUM J. PYLORUS K. GALLBLADDER L. RIGHT LOBE OF LIVER Identify the digestive organs and sphincters. Do not indicate regions or sections (i.e. pylorus and duodenum). Do not list an organ more than once. Record the digestive secretion produced by the organ, if applicable. Where are the...
Question 4) Assume an economy that can be described by the following Table 1. Table 1...
Question 4) Assume an economy that can be described by the following Table 1. Table 1 Year Potential GDP Real GDP Price Level 1 $1 020 billion $1 020 billion 100 2 $1 080 billion $1 060 billion 103 Draw a dynamic aggregate demand and aggregate supply diagram to illustrate the state of the economy in Year 1. How can we characterize this position in Year 1? Answer: this position can be characterized Assume in Year 2 that no policy...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT