Database System Concepts
Database System Concepts
7th Edition
ISBN: 9781260084504
Author: Abraham Silberschatz, S. Sudarshan, Abraham, Henry Korth, Silberschatz Abraham, Silberschatz Professor
Publisher: McGraw-Hill Education
Expert Solution & Answer
Book Icon
Chapter 8, Problem 12E

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...

Blurred answer
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education