Question: 1. Create two tables containing data with at least 4 columns and 4 rows of data each so that the tables clearly are not union-

1. Create two tables containing data with at least 4 columns and 4 rows of data each so that the tables clearly are not union- compatible. You cannot use one of the examples from class or the book- create your own. 2. Create two tables containing data with at least 4 columns and 4 rows of data each that are union-compatible. Be sure that at least one row (but not all rows) in the first table is identical to a row in the second table. You cannot use one of the examples from class or the book- create your own. Use these two tables to illustrate the Union relational operator, then the Difference relational operator For the remaining questions, use the following tables that depict that an author can write many books, and a book can have many authors. Each book has only one publisher, but a publisher can publish many books. The primary keys are indicated below. AUTHOR (primary key: AU ID) AU ID AU LNAME AU FNAME 101 102 103 104 Peterson Sullivan Patel Huan Cliff Rich Kumar Wen WRITES (composite primary key: AU_ID, BOOK_ID) AULD | BOOK-ID 101 103 101 105 103 104 500 500 501 501 502 502 BOOK (primary key: BOOK ID) BOOK-ID | BOOK TITLE I BOOK COST I PUB ID ! 14.95 21.49 Al A2 Sunny Days 500 501 502 503 Rainy Nights Happy Mornings 19.99 Sultry Evenings 25.95 Al PUBLISHER (primary key: PUB ID) PUB STATE NY PUB ID PUB NAME Al A2 A2 ?? Shining Press Wrinkled Publishing NY Matte Co Merchant Publishing MD Printing CA Does the PUBLISHER table have entity integrity? Why or why not? Does the WRITES table have entity integrity? Why or why not? Does the WRITES table have referential integrity in its relationship with AUTHOR? Why or why not? Does the BOOK table have referential integrity in its relationship with Does 4 PUBLISHER? Why or why not? the BOOK table have referential integrity in its relationship with WRITES? Why or why not? Create the table that would result from a Natural Join of PUBLISHER-join-BOOK. Create the table that would result from an Equijoin of PUBLISHER-join-BOOK Create the table that would result from a Left Outer Join of PUBLISHER-join-BOOK. 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
