wm.txt - drop table bookdetails cascade constraints drop...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
drop table bookdetails cascade constraints; drop table map cascade constraints; drop table ReferenceBook cascade constraints; drop table rarebook cascade constraints; drop table member cascade constraints; drop table student cascade constraints; drop table Professor cascade constraints; drop table author cascade constraints; drop table authorBD cascade constraints; drop table phone cascade constraints; drop table book cascade constraints; drop table staff cascade constraints; drop table rentrecord cascade constraints; drop table addressDetail cascade constraints; Create Table BookDetails( ISBN Varchar2(15), Title Varchar2(50), Subject_Area Char(2), Language Char(2) CONSTRAINT BookDetail_Language_cc CHECK((Language='EN') OR (Language='CN') OR (Language='BM') OR (Language='TA')), Edition Char(2), Binding Char(2) CONSTRAINT BookDetail_Binding_cc CHECK((Binding='SC') OR (Binding='HC')), Year Number(4), CONSTRAINT bookdetails_isbn_pk PRIMARY KEY(ISBN) ); INSERT INTO BOOKDETAILS VALUES('0-457-98564-6', 'Information Tecnology Managent','FF','EN','4','SC',1987); INSERT INTO BOOKDETAILS VALUES('1-585-85464-8', 'Micro Economic','BS','CN','4','SC',1997); INSERT INTO BOOKDETAILS VALUES('7-254-66447-7', 'Sun zi''s artwar','MR','CN','9','HC',2015); INSERT INTO BOOKDETAILS VALUES('2-952-10132-0', 'C++ Programming','IT','EN','8','SC',1997); INSERT INTO BOOKDETAILS VALUES('3-437-98444-1', 'Hubungan Etnik','PA','BM','2','SC',2014); INSERT INTO BOOKDETAILS VALUES('1-332-56777-8', 'Political Map of Malaysia','RM','BM','-','HC',2013); INSERT INTO BOOKDETAILS VALUES('4-538-76778-0', 'Physical Map of Utar','RM','EN','-','HC',2013); INSERT INTO BOOKDETAILS VALUES('9-137-90647-2', 'Climate Map of Kampar','RM','BM','-','HC',2000); INSERT INTO BOOKDETAILS VALUES('2-012-63798-1', 'Political Map of United State','RM','EN','-','HC',1980); INSERT INTO BOOKDETAILS VALUES('1-201-50171-4', 'Road Map of Johor','RM','TA','-','HC',2010); INSERT INTO BOOKDETAILS VALUES('8-201-71451-4', 'Oxford English-Chinese Dictionary','RM','EN','-','HC',2013); INSERT INTO BOOKDETAILS VALUES('6-630-25684-6', 'Plant Encyclopedia','RM','CN','-','SC',2015);
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
INSERT INTO BOOKDETAILS VALUES('5-825-36201-2', 'Bibliography of Tunku Adbul Rahman','RM','BM','-','SC',1980); INSERT INTO BOOKDETAILS VALUES('2-001-23650-0', 'Index Of Utar Library','RM','EN','-','SC',2006); INSERT INTO BOOKDETAILS VALUES('3-360-97521-1', 'The Copyright HandBook','RM','TA','-','SC',2005); INSERT INTO BOOKDETAILS VALUES('1-526-48888-1', 'Wawasan 2020','RM','CN','-','HC',2005); INSERT INTO BOOKDETAILS VALUES('5-782-64120-5', 'Angel And Demon','RM','EN','-','SC',2000); INSERT INTO BOOKDETAILS VALUES('4-645-25546-8', 'Kingdom Of Shan Guo','RM','CN','-','HC',1800); INSERT INTO BOOKDETAILS VALUES('9-588-51500-5', 'Journey To The West','RM','CN','-','HC',1820); INSERT INTO BOOKDETAILS VALUES('1-561-48415-3', 'Sherlock Holmes','RM','CN','-','SC',1950); Create Table Map( ISBN Varchar2(15), Type Char(10), CONSTRAINT bookdetails_map_isbn_pk PRIMARY KEY(ISBN), CONSTRAINT bookdetails_map_isbn_fk FOREIGN KEY(ISBN) REFERENCES bookdetails(ISBN) ); insert into Map values ('1-332-56777-8','Political'); insert into Map values ('4-538-76778-0','Physical'); insert into Map values ('9-137-90647-2','Climate'); insert into Map values ('2-012-63798-1','Political'); insert into Map values ('1-201-50171-4','Road'); Create Table ReferenceBook( ISBN Varchar2(15), Type Char(15), CONSTRAINT bookdetails_ref_isbn_pk PRIMARY KEY(ISBN), CONSTRAINT bookdetails_ref_isbn_fk FOREIGN KEY(ISBN) REFERENCES bookdetails(ISBN) ); insert into ReferenceBook values ('8-201-71451-4','Dictionary');
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern