DATABASE SYSTEM CONCEPTS (LL)<CUSTOM>
7th Edition
ISBN: 9781264315482
Author: SILBERSCHATZ
Publisher: MCG CUSTOM
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 4, Problem 7PE
Explanation of Solution
Query
create table student
(ID varchar(5),
name varchar(20) not null,
dept_name varchar(20),
tot_cred numeric(3,0) check(tot_cred>=0),
primary key(ID),
foreign key (dept_name) references department
on delete set null);
create table takes
(ID varchar(5),
course_id varchar(8),
section_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2),
primary key(ID, course_id, section_id, semester, year)
foreign key(course_id, section_id, semester, year) references section
on delete cascade
foreign key(ID) references student
on delete cascade);
create table advisor
(i_id varchar(5),
s_id varchar(5),
primary key(s_id),
foreign key(i_id) references instructor(id)
�...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
DATABASE SYSTEM CONCEPTS (LL)<CUSTOM>
Ch. 4 - Prob. 1PECh. 4 - Prob. 2PECh. 4 - Prob. 3PECh. 4 - Prob. 4PECh. 4 - Prob. 5PECh. 4 - Prob. 6PECh. 4 - Prob. 7PECh. 4 - Prob. 8PECh. 4 - SQL allows a foreign-key dependency to refer to...Ch. 4 -
Given the relations a(name, address, title) and...
Ch. 4 - Prob. 11PECh. 4 - Prob. 12PECh. 4 - Prob. 13PECh. 4 - Prob. 14ECh. 4 - Prob. 15ECh. 4 - Prob. 16ECh. 4 - Prob. 17ECh. 4 - Prob. 18ECh. 4 - Prob. 19ECh. 4 - Show how to define a view tot_credits (year,...Ch. 4 - Prob. 21ECh. 4 - Prob. 22ECh. 4 - Prob. 23ECh. 4 - Prob. 24ECh. 4 - Prob. 25ECh. 4 - Prob. 26E
Knowledge Booster
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education