Modern Database Management
13th Edition
ISBN: 9780134773650
Author: Hoffer
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 5, Problem 5.37PAE
To enforce referential integrity, before any row can be entered into the SECTION table, the CourselD to be entered must already exist in the COURSE table. Write an SQL assertion that will enforce this constraint.
Expert Solution & Answer
Trending nowThis is a popular solution!
Learn your wayIncludes step-by-step video
schedule05:16
Students have asked these similar questions
Because of referential integrity, before any row can be entered into the SECTION table, the CourseID to be entered must already exist in the COURSE table. Write an SQL assertion that will enforce this constraint.
A. Write SQL statements to create a table named STUDENT, with the following columns:
StdID: character field of width 10, null is not allowed
AdvID: character field of width 10, null is not allowed
B. Given that the STUDENT table is created in part (a), write a SQL statement to insert a constraint to STUDENT table created in part (a) to designate StdID as the primary key (Do not recreate another STUDENT since it was already done in part a).
In Sql
These are some database from a set of tables
insert into AccountHolder(AccountID, CustomerID, AccountType)values
(55003, 115, 'Savings'),(44001, 101, 'Chequing'),(55006, 109, 'Savings'),(44002, 102, 'Chequing'),(44003, 113, 'Chequing'),(55007, 108, 'Savings'),(44004, 103, 'Chequing'),(44005, 110, 'Chequing'),(55005, 112, 'Savings'),(44006, 114, 'Chequing'),(55001, 111, 'Savings'),(44007, 107, 'Chequing'),(44008, 104, 'Chequing'),(55004, 106, 'Savings'),(44009, 105, 'Chequing'),(44010, 113, 'Chequing'),(55002, 107, 'Savings'),(44011, 110, 'Chequing'),(44012, 104, 'Chequing')
select * from AccountHolder
insert into Branch(LocationID, BranchName, Address, Type, DepositSum, LoanSum)values
(1, 'Boulevard Branch', '3268 Wade Boulevard', 'Rural', 171848.88, 37681.72),(2, 'Avenue Branch', '4814 Dare Avenue', 'Rural', 232707.42, 68324.56),(3, 'Street Branch', '208 Ferry Street', 'Commercial', 375010.75, 44665.08),(4, 'Road Branch', '468 Zulauf Road', 'Commercial', 496001.41,…
Chapter 5 Solutions
Modern Database Management
Ch. 5 - Define each of the following terms: data...Ch. 5 - Match the following terms to the appropriate...Ch. 5 - Prob. 5.3RQCh. 5 - Prob. 5.4RQCh. 5 - Prob. 5.5RQCh. 5 - Prob. 5.6RQCh. 5 - List six potential benefits of achieving an SQL...Ch. 5 - Prob. 5.8RQCh. 5 - Distinguish among data definition commands, data...Ch. 5 - Prob. 5.10RQ
Ch. 5 - Prob. 5.11RQCh. 5 - Explain the purpose of indexing in database...Ch. 5 - What are the potential consequence of...Ch. 5 - Prob. 5.14RQCh. 5 - Explain and provide at least one example Of how to...Ch. 5 - Prob. 5.16RQCh. 5 - What is the difference between COUNT, COUNT...Ch. 5 - What is the evaluation order for the Boolean...Ch. 5 - If an SQL statement includes a GROUP BY clause,...Ch. 5 - Prob. 5.20RQCh. 5 - Prob. 5.21RQCh. 5 - Prob. 5.22RQCh. 5 - Explain why SQL is called a set-oriented language.Ch. 5 - When would the use of the LIKE key word with the...Ch. 5 - Prob. 5.25RQCh. 5 - Prob. 5.26RQCh. 5 - In what order are the clauses of an SQL statement...Ch. 5 - Within which clauses of an SQL statement can a...Ch. 5 - Prob. 5.29RQCh. 5 - Prob. 5.30RQCh. 5 - Prob. 5.31RQCh. 5 - Explain the difference between the WHERE and...Ch. 5 - Prob. 5.33RQCh. 5 - Write a database description for each of the...Ch. 5 - Analyze the database to determine whether or not...Ch. 5 - Prob. 5.36PAECh. 5 - To enforce referential integrity, before any row...Ch. 5 - Write SQL data definition commands for each of the...Ch. 5 - Write SQL commands for the following: Create two...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Write SQL queries to answer the following...Ch. 5 - Prob. 5.44PAECh. 5 - Prob. 5.45PAECh. 5 - Prob. 5.46PAECh. 5 - What is the average Read score for all students?...Ch. 5 - Prob. 5.48PAECh. 5 - What are the TutorIDs for tutors who have not yet...Ch. 5 - Prob. 5.50PAECh. 5 - Prob. 5.51PAECh. 5 - Prob. 5.52PAECh. 5 - Prob. 5.53PAECh. 5 - Prob. 5.54PAECh. 5 - How many tutors have an Active status in the...Ch. 5 - Prob. 5.56PAECh. 5 - Modify the Product_T table by adding an attribute...Ch. 5 - Enter sample data of your own choosing into...Ch. 5 - Add an order to the Order_T table and include a...Ch. 5 - Use the Pine Valley database to answer the...Ch. 5 - Prob. 5.61PAECh. 5 - Prob. 5.62PAECh. 5 - Prob. 5.63PAECh. 5 - Prob. 5.64PAECh. 5 - Prob. 5.65PAECh. 5 - Prob. 5.66PAECh. 5 - Prob. 5.67PAECh. 5 - Modify query in P&E 5-67 by considering only those...Ch. 5 - Prob. 5.69PAECh. 5 - Prob. 5.70PAECh. 5 - Prob. 5.71PAECh. 5 - Prob. 5.72PAECh. 5 - Prob. 5.73PAECh. 5 - Prob. 5.74PAECh. 5 - Prob. 5.75PAECh. 5 - Prob. 5.76PAECh. 5 - Prob. 5.77PAECh. 5 - Assume that for those materials the ID of which...Ch. 5 - Prob. 5.79PAECh. 5 - Prob. 5.80PAECh. 5 - Prob. 5.81PAECh. 5 - Prob. 5.82PAECh. 5 - Prob. 5.83PAECh. 5 - Prob. 5.84PAECh. 5 - Prob. 5.85PAECh. 5 - Prob. 5.86PAECh. 5 - Prob. 5.87PAECh. 5 - Prob. 5.88PAECh. 5 - Prob. 5.89PAECh. 5 - Prob. 5.90PAECh. 5 - Prob. 5.91PAECh. 5 - Prob. 5.92PAECh. 5 - Prob. 5.93PAE
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Write an SQL statement to display the name, breed, and type for all pets that are not of type Cat, Dog, or Fish...
Database Concepts (7th Edition)
Big data Big data describes datasets with huge volumes that are beyond the ability of typical database manageme...
Management Information Systems: Managing the Digital Firm (15th Edition)
The following statement decrements the variable x: Set x = x - 1.
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
The ____________ is always transparent.
Web Development and Design Foundations with HTML5 (8th Edition)
Type in and run the six programs presented in this chapter. Compare the output produced by each program with th...
Programming in C
How were the pseudocodes of the early 1950s implemented?
Concepts of Programming Languages (11th 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
- Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.arrow_forwardWrite the SQL code that will change the PROJ_NUM to 14 for employees who were hired before January 1, 1994, and whose job code is at least 501. (You may assume that the table will be restored to its condition preceding this question.)arrow_forwardWrite the SQL code to delete the row for William Smithfield, who was hired on June 22, 2004, and whose job code is 500. (Hint: Use logical operators to include all of the information given in this problem.)arrow_forward
- Problem 1 and 2 are based on the following query: SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX FROM EMPLOYEE WHERE EMP_SEX = 'F' AND EMP_AREACODE = '615' ORDER BY EMP_LNAME, EMP_FNAME; What indexes should you create? Write the required SQL commands.arrow_forwardplz help with the following use oracle sql or sql live The procedure should satisfy the following requirements. The video number will be provided as a parameter. a) Verify the video number exists in the VIDEO table. If it does not exist, display a message that the video number provided was not found and do not write any data to the database. b) If the video number does exist, then use a Count() function to ensure that the video has only one record in DETAILRENTAL for which it does not have a return date. If more than one row in DETAILRENTAL indicates that the video is rented but not returned, display an error message that the video has multiple outstanding rentals and do not write any data to the database. the databse CREATE TABLE MEMBERSHIP( MEM_NUM CHAR(3) CONSTRAINT MEMBER_MEM_NUM_PK PRIMARY KEY,MEM_FNAME VARCHAR(30) NOT NULL,MEM_LNAME VARCHAR(30) NOT NULL,MEM_STREET VARCHAR(15),MEM_CITY VARCHAR(10),MEM_STATE CHAR(2),MEM_ZIP CHAR(5),MEM_BALANCE NUMBER (2)); ALTER TABLE…arrow_forwardTHIS MODULE IS ABOUT SUBQUERIES, SO YOU MUST USE SUBQUERIES INSTEAD OF TABLE JOINS (a) From which two fields in which table can you calculate the enrollment of a section?(b) From which table can you get both course and section numbers?(c) Which field in table SECTION uniquely identifies a section, section id or section no?(d) Write a SQL statement to show sections and their enrollment.(e) Write a SQL statement to show sections with enrollment greater than five. Display both course andsection numbersarrow_forward
- Write the SQL code that will produce the same information that was shown in Problem 2, but sorted by the employee’s last name. The results of running that query are shown in Figure P7.3.arrow_forwardhttps://sqliteonline.com/ : Program link The first requirement: Using the SQL language, transform the following entity model into tables in the database. Entity Manger contains: M-name The name of the manager. M-ID and manager number.The department entity contains: D-name The name of the department. D-ID and department number.Create constraint master key name of the manager when creating the Manger table.Creating the foreign key constraint The name of the manager when creating the Department table. The second requirement: After creating the tables and specifying the primary and foreign key, do the following: * Add a column D_loc to the Department table, specifying the type of column.* Remove the column named M_name from the Manger table* Change the name of the department table to Dep Please:: ******* ATTACH A PICTURE OF THE CODES USED AND PICTURE OF THE PROGRAM SCREEN *******arrow_forwardQuestion 14 Write a SQL statement to un-grant the select and alter privilege from the user Ahmed. Assume that the table name is 'student' Use the editor to format your answerarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase 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 Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
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