Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is a Foreign Key (FK) in BOOK for AuthorID to the Primary Key of Author Identify the primary keys in BOOK (1 pt. )

image text in transcribed

There is a Foreign Key (FK) in BOOK for AuthorID to the Primary Key of Author

  1. Identify the primary keys in BOOK (1 pt. )

  2. Identify the primary keys in AUTHOR (1 pt.)

  3. What is the domain of BOOK? (1 pt)

  4. What constraints would the following code obviously violate if any (there may be none in which case write none, or more than one.) ? (1pt each)

    1. INSERT INTO BOOK (ISBN, BookName, AuthorID, Type) VALUES (Null, 1984, 190, Fiction)

    2. INSERT INTO AUTHOR (AuthorID, AuthorName) VALUES (10, Arthur C. Clarke)

    3. INSERT INTO AUTHOR (AuthorID, AuthorName) VALUES (15, Dodie Smith)

    4. INSERT INTO BOOK (ISBN, BookName, AuthorID, Type) VALUES (5, Emma, 10, Fiction)

    5. DELETE FROM AUTHOR WHERE AuthorID = 12

    6. DELETE FROM AUTHOR WHERE AuthorID = 14

    7. UPDATE AUTHOR SET AUTHORNAME = Jane Austen WHERE AuthorID = 10

BOOK ISBN: int BookName : varchar(50) AuthorID : int Type : varchar(20) Fiction 2 Fiction Pride and Prejudice The Call of the Wild White Fang In Cold Blood 10 12 12 13 Fiction Non-Fiction AUTHOR AuthorID : int AuthorName : varchar(50) Jane Austin Jack London Truman Capote Charlotte Bronte

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions