Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Which constraint would be violated if we inserted the tuple (Knuth, Donald, 111222333) into the customer relation? (a) Primary key on the customer relation.

image text in transcribed

1. Which constraint would be violated if we inserted the tuple (Knuth, Donald, 111222333) into the customer relation?

(a) Primary key on the customer relation.

(b) Primary key on the airline customer relation.

(c) Foreign key on the airline customer relation referencing customer(name).

(d) No constraints would be violated.

2. Which constraint would be violated if we updated the tuple (1337, Delta, 3333) in the trip flight relation to be (1337, Delta, 2222)?

(a) Primary key on the trip flight relation.

(b) Primary key on the flight relation.

(c) Foreign key on the trip flight relation referencing flight(airline, flight no).

(d) No constraints would be violated.

3. Which constraints on the airline customer relation would be violated if we inserted the tuple (American, NULL, NULL) into it?

(a) Primary key.

(b) Primary and both foreign keys.

(c) Primary key and foreign key referencing customer(name).

(d) No constraints would be violated.

4. In general, what kind of constraints can we violate by deleting a tuple?

(a) Primary keys only.

(b) Foreign keys only.

(c) Both primary and foreign keys.

If it is possible, would you please explain each answer plz?

flight: Primary Key (airline, flight .no), Foreign Key (airline) on airline(name) airline Southwest473 Southwest474 Delta Delta Delta Delta flight no dep airport arr airportdep.time arr.time fare airplane DEN RDU LAX CHI CHI JFK RDU DEN CHI LAX JFK CHI 270 B737 295B737 310A320 355 B777 260 RJ145 260RJ145 10:10 15:45 1010 13:05 12:50 702 910 20:20 11:20 airline: Primary Key customer: Primary Key (name website passport no 273001431 name ame Southwest southwest.com Delta American aa.com Turing, Alan delta.com Hopper, Grace 300420023 Dijkstra, Edsger 918340799 trip: Primary Key (trip.id), Foreign Key (customer) on customer(name) trip.id customer 1337 Hopper, Grace 1338 Dijkstra, Edsge Raleigh/Durham Denver from-city ew York departure.date return date to city Los Angeles2015-10-26 2015-11-4 2015-11-2 2015-10-26 trip flight Primary Key (trip.id, airline, flight no), Foreign Key (trip.id) on trip(trip.id), Foreign Key (airline, flight no) on flight(airline airline customer Primary Key (airline, customer), Foreign Key (airline) on airline(name), Foreign Key (customer) on customer(name) trip.id airline 1337 Delta 1337Delta 1337 Delta 1337Delta 1338 Southwest474 1338Southwest 473 flight .no airline customer erid Southwest Hopper, Grace 10001 Southwest Dijkstra, Edsger 71042 AmericanTuring, Alan 1010 10393992 Hopper, Grace 272100-442 Figure 1: Relational schema and sample tuples for a (vastly simplified) air travel database

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

How would you describe your typical day at work?

Answered: 1 week ago