Database Systems: Design, Implementation, & Management
13th Edition
ISBN: 9781337627900
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 8, Problem 1RQ
Program Plan Intro
Integrity constraints:
The limitations in the relational data model which is used to maintain the data’s accuracy and maintain its integrity is termed as integrity constraints.
In SQL CREATE TABLE commands, the types of integrity constraints enforced when a primary key is declared are:
- Entity integrity
- Referential integrity
Primary key:
Primary key is used to identify the unique record from a collection of records.
- To identify each record in a table, at least there must be one data field which should be unique. That is, corresponding data field of every record should be unique. It is called a primary key.
- To relate two tables, a primary key field in one table is added to the related table, and it is called foreign key.
Expert Solution & Answer
Explanation of Solution
Entity integrity:
- When creating a table, the primary key in the table must be assured and the attributes in the table should not be null.
- The values added in the attribute should be valid.
- Hence, NOT NULL and PRIMARY KEY clause in the SQL CREATE TABLE command enforces entity integrity.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
What is the distinction between the two kinds of integrity constraints?
Is it feasible to control the integrity of a field by picking a certain data type as the value for that field?
What distinguishes the two kinds of integrity constraints?
Chapter 8 Solutions
Database Systems: Design, Implementation, & Management
Ch. 8 - Prob. 1RQCh. 8 - Explain why it might be more appropriate to...Ch. 8 - What is the difference between a column constraint...Ch. 8 - What are referential constraint actions?Ch. 8 - What is the purpose of a CHECK constraint?Ch. 8 - Explain when an ALTER TABLE command might be...Ch. 8 - What is the difference between an INSERT command...Ch. 8 - What is the difference between using a subquery...Ch. 8 - What is the difference between a view and a...Ch. 8 - Prob. 10RQ
Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Write the SQL code that will create only the table...Ch. 8 - Having created the table structure in Problem 1,...Ch. 8 - Prob. 3PCh. 8 - Write the SQL code that will save the changes made...Ch. 8 - Write the SQL code to change the job code to 501...Ch. 8 - Write the SQL code to delete the row for William...Ch. 8 - Write the SQL code to create a copy of EMP_1,...Ch. 8 - Using the EMP_2 table, write the SQL code that...Ch. 8 - Using the EMP_2 table, write the SQL code to...Ch. 8 - Prob. 10PCh. 8 - Prob. 11PCh. 8 - Prob. 12PCh. 8 - Prob. 13PCh. 8 - Prob. 14PCh. 8 - Prob. 15PCh. 8 - Create the CUSTOMER table structure illustrated in...Ch. 8 - Create the INVOICE table structure illustrated in...Ch. 8 - Prob. 18PCh. 8 - Prob. 19PCh. 8 - Create an Oracle sequence named CUST_NUM_SEQ to...Ch. 8 - Create an Oracle sequence named INV_NUM_SEQ to...Ch. 8 - Prob. 22PCh. 8 - Modify the CUSTOMER table to include the customers...Ch. 8 - Prob. 24PCh. 8 - Prob. 25PCh. 8 - Create a trigger named trg_updatecustbalance to...Ch. 8 - Prob. 27PCh. 8 - Prob. 28PCh. 8 - Write a trigger to update the customer balance...Ch. 8 - Prob. 30PCh. 8 - Create a trigger named trg_line_total to write the...Ch. 8 - Create a trigger named trg_line_prod that...Ch. 8 - Create a stored procedure named prc_inv_amounts to...Ch. 8 - Create a procedure named prc_cus_balance_update...Ch. 8 - Modify the MODEL table to add the attribute and...Ch. 8 - Prob. 36PCh. 8 - Modify the CHARTER table to add the attributes...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Prob. 43PCh. 8 - Create a trigger named trg_char_hours that...Ch. 8 - Create a trigger named trg_pic_hours that...Ch. 8 - Create a trigger named trg_cust_balance that...Ch. 8 - Write the SQL code to create the table structures...Ch. 8 - The following tables provide a very small portion...Ch. 8 - For Questions 49-63, use the tables that were...Ch. 8 - Prob. 50PCh. 8 - Write a single SQL command to increase all price...Ch. 8 - Alter the DETAILRENTAL table to include a derived...Ch. 8 - Update the DETAILRENTAL table to set the values in...Ch. 8 - Alter the VIDEO table to include an attribute...Ch. 8 - Update the VID_STATUS attribute of the VIDEO table...Ch. 8 - Alter the PRICE table to include an attribute...Ch. 8 - Prob. 57PCh. 8 - Prob. 60P
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In what circumstances does it make sense to assume that two select statements from the same database are consistent with one another?arrow_forward"What exactly is the idea of integrity constraints?"arrow_forwardWhen it comes to union, just where does it make the most sense to make the argument that two select statements drawn from the same database are consistent with one another?arrow_forward
- True or false: The database management system can protect you in a number of ways from getting invalidated into the database in the first place through a series of rules called "referential constraints". Sometimes they are implemented through a new related data table.arrow_forwardCan the security of a field be managed by choosing the data type it stores?arrow_forwardThe distribution of keys may be done in a myriad of different ways. What is the most amazing thing, and what makes it the best?arrow_forward
- What is the key difference between trying to avoid a deadlock and trying to prevent one from occurring?arrow_forwardThere may be serious repercussions if a database's referential integrity were compromised. What errors do you commit most frequently?arrow_forwardWhat happens if your database's referential integrity is not enforced? What kind of errors are more likely to occur?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning