a.
Explanation of Solution
SQL schema definition
- Person relation type is considered.
create type Person (ID integer, name varchar (30), address varchar (50))
create table person of Person
- Employee relation type is considered.
create type Employee under Person (salary integer)
create table employee of Employee under person
- Student relation type is considered...
b.
Explanation of Solution
SQL query to find the names of all people who are not secretaries
Query
select name from person where not exists
(select value(e) from employee e where value(e) is of (Secretary))
Explanation
- The “is of” type predicate is used to test object instance of a particular subtype or not...
c.
Explanation of Solution
SQL query to print the names of people who are neither employees nor students
Query
select name from person where not exists
((select value(p) from person p where value(p) is of (employee)) and (select value(p) from person p where value(p) is of (student))...
d.
Explanation of Solution
Reason for not creating a person who is an employee and a student
“No”, a person who is both an employee and a student cannot be created.
Reason
- Structured Query Language (SQL) does not support multiple inheritance.
- Different tables are used to store an employee or a student...
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Database System Concepts
- 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