EBK DATABASE CONCEPTS
7th Edition
ISBN: 9780133777840
Author: AUER
Publisher: VST
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 1, Problem 1.24RQ
Define the term referential integrity constraint. Give an example of a referential integrity constraint for the tables you created for question 1.11.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write SQL statements to create at the two tables for the database. The tables must have at least three relevant columns with appropriate types, a primary key and at least one table should have a foreign key and the related foreign key constraints.
CREATE TABLE students (
Student_id int NOT NULL PRIMARY KEY,
Stud_firstname VARCHAR(30) NOT NULL,
Stud_lastname VARCHAR(30) NOT NULL,
Stud_email VARCHAR(80) NOT NULL UNIQUE
advisor_id int,
);
create table advisor (
advisor_id int not null primary key,
stud_id int,
adv_firstname varchar(30),
adv_lastname varchar(30),
foreign key(student_id) references students(student_id)
);
[keep getting error, need help correcting]
Define the term referential integrity constraint. Give an example of a referential integrity constraint for the tables you created for question 1.8.
Write a Structured Query Language (SQL) statement for each of the following questions:a) Create the AppointmentDetails table with the following requirements: Appropriate data types. All keys can store between 6 to 10 characters. All the columns must have values (cannot be empty). Add on charges is set to 0.00 by default. Enforce entity and referential integrities.
b) Diplay the therapists’ particulars (include TheraName, TheraContact) as first two columns, then calculate the Total_Count_Of_Appointment for each therapist within the year 2020 as third columns. Lastly, arrange the outcome to show the list by the higher popularity of therapists first.
Chapter 1 Solutions
EBK DATABASE CONCEPTS
Ch. 1 - Why is the study of database technology important?Ch. 1 - Prob. 1.2RQCh. 1 - Describe the purpose of a database.Ch. 1 - Prob. 1.4RQCh. 1 - Prob. 1.5RQCh. 1 - Prob. 1.6RQCh. 1 - Prob. 1.7RQCh. 1 - Break the list in Figure 1-34 into two tables,...Ch. 1 - Show how the tables you created for question 1.11...Ch. 1 - Prob. 1.10RQ
Ch. 1 - Prob. 1.11RQCh. 1 - Break the list in Figure 1-35 into tables, each...Ch. 1 - Describe in your own words and illustrate with...Ch. 1 - Prob. 1.14RQCh. 1 - Define the term database.Ch. 1 - Prob. 1.17RQCh. 1 - List the components of a database.Ch. 1 - Prob. 1.19RQCh. 1 - Prob. 1.20RQCh. 1 - Prob. 1.21RQCh. 1 - What is the purpose of a DBMS?Ch. 1 - List the specific functions of a DBMS.Ch. 1 - Define the term referential integrity constraint....Ch. 1 - Prob. 1.25RQCh. 1 - List the functions of a database application.Ch. 1 - Prob. 1.27RQCh. 1 - Prob. 1.28RQCh. 1 - Prob. 1.29RQCh. 1 - Prob. 1.30RQCh. 1 - Prob. 1.31ECh. 1 - Prob. 1.32ECh. 1 - Prob. 1.33E
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
The following C++ program will not compile because the lines have been mixed up. cout Success\n; cout Success...
Starting Out with C++ from Control Structures to Objects (8th Edition)
Computers process data under the control of sets of instructions called
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
When a selector name starts with a period in a JavaFX CSS style definition, it means the selector corresponds t...
Starting Out with Java: Early Objects (6th Edition)
Leap Year Detector Design a program that asks the user to enter a year, and then displays a message indicating ...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Porter’s competitive forces model: The model is used to provide a general view about the firms, the competitors...
Management Information Systems: Managing The Digital Firm (16th Edition)
Using your text editor, enter (that is, type in) the C++ program shown in Display 1.8. Be certain to type the f...
Problem Solving with C++ (10th Edition)
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
- Task 5: The Driver Relationship team requested to ensure that there will be no duplicates in the active drivers tables in terms of first name, last name and driving license ID. You need to create a constraint in the ACTIVE_DRIVERS table, called DuplicateCheck, to ensure the first name, last name, and the driving license ID are unique. ANSWER IN MYSQL PLEASEarrow_forwardNot all versions of this database include referential integrity constraints for all foreign keys. Use whatever commands are available for the RDBMS you are using, investigate if any referential integrity constraints are missing. Write any missing constraints and, if possible, add them to the associated table definitions.arrow_forwardWhat is the difference between a PRIMARY KEY constraint and a UNIQUE constraint? ( refer to the tables in the JustLee Books database).arrow_forward
- Write SQL code for the following design schema of three tables. The tables should have the following properties: sales table has a primary key on SalesNumber and it is set to AUTO-INCREMENT.products table has a primary key on number and it is set to AUTO-INCREMENT, they is an unique index on prodidsalesdetails table has a primary key on number and it is set to AUTO-INCREMENT, they is an index on prodid. They is a one-to-many relationship between the salesdetails.SalesNumber andsales.SalesNumber fields. There is a one-to-many relationship between the products.prodid and salesdetails.prodid fields. There is to be a delete constraint on the product.prodid field a record in the product table should not be allowed to be deleted if they exist a matching prodid in the salesdetails table. Primary and foreign keys should be implemented in the appropriate tables. Referential Integrity should be enforce at the database level, where appropriate for example, if a sales record is deleted all…arrow_forwardThe Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.arrow_forwardUsing the Henry Books database,Henry Books no longer carries books written by Barbara Owen. Delete this author from the authors table. You will insert 2 snips for this question. What construct did you use to delete author Barbara Owens? Insert the snip of the construct used: Insert the snip of the authors table. Be sure all rows are displayed:arrow_forward
- Write CREATE TABLE statements to implement the following design. Include foreign key constraints. Define the individualID, and GroupID as identity columns. Decide which columns should allow null values, if any. Define Dues column with a default of zero and check constraints to allow only positive values.arrow_forwardTask 2: The Driver Relationship team wants to ensure that the all driving license IDs in the active drivers table have the length of 7. Alter the ACTIVE_DRIVERS table created in Chapter 8, Activity 1 to check the length of the DRIVER_DRIVING_LICENSE_ID. Add a CHECK to the ACTIVE_DRIVERS table to enforce a driver license length of 7. Test Query: SELECT DISTINCT(constraint_name) FROM information_schema.check_constraints WHERE constraint_schema = 'InstantRide' AND constraint_name = 'ACTIVE_DRIVERS_chk_1' Expected Results CONSTRAINT_NAME ACTIVE_DRIVERS_chk_1arrow_forwardConsidering Vaccination Database, write queries to: Display the Subject CNIC, Name, Contact, Dose1 Center, and Dose2 Center as shown below: CNIC Name Contact Dose1 Center Dose2 Center 22401-6645321-1 Nasir 3409991112 Lachi Kohat 2 14301-6045321-5 Shahab 3409991112 kohat 3 Dara The subjects who have been vaccinated different types in Dose1 and Dose2. For instance, subjects who were vaccinated ‘Sinovac’ in the first dose, while Pfizer in the second dose.How many Viles of each type have been consumed so far. How many subjects are vaccinated from expired viles. Suggest the name of Incharge for the best performance award based on the highest number of subjects vaccinated on a single dayarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY