Question: Create tables using SQL according to the given schema. You must your database using exactly the same name for tables and attributes, using the given

Create tables using SQL according to the given schema. You must your database using exactly the same name for tables and attributes, using the given type.


Schema


Customer (cid, name, address);


Orders (oid, order_date, cid) foreign key (cid) references Customer(cid);


Order_book(oid, isbn, no_of_copy) foreign key (oid) references Orders(oid), foreign key(isbn) references Book (isbn);


Publisher (pid, name, address, phone);


Book (isbn, title, btype, price, pub_date, pid)


      foreign key (pid) references Publisher (pid);


Author (aid, fname, lname);


Written_by(isbn, aid)


      foreign key (isbn) references Book (isbn), foreign key (aid) references Author (aid);


Editor (eid, fname, lname);


Edited_by(eid, isbn)


foreign key (isbn) references Book (isbn), foreign key (eid) references Editor (eid);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!