The document defines tables for publishers, books, book authors, library branches, book copies, and book lending. Publishers table is populated with sample data. Tables are created for books, book authors, library branches, book copies, and book lending with primary and foreign keys defined to link the tables. The books table is partitioned into two partitions based on the publisher year field. Sample data is inserted into the book lending table.
The document defines tables for publishers, books, book authors, library branches, book copies, and book lending. Publishers table is populated with sample data. Tables are created for books, book authors, library branches, book copies, and book lending with primary and foreign keys defined to link the tables. The books table is partitioned into two partitions based on the publisher year field. Sample data is inserted into the book lending table.
The document defines tables for publishers, books, book authors, library branches, book copies, and book lending. Publishers table is populated with sample data. Tables are created for books, book authors, library branches, book copies, and book lending with primary and foreign keys defined to link the tables. The books table is partitioned into two partitions based on the publisher year field. Sample data is inserted into the book lending table.
The document defines tables for publishers, books, book authors, library branches, book copies, and book lending. Publishers table is populated with sample data. Tables are created for books, book authors, library branches, book copies, and book lending with primary and foreign keys defined to link the tables. The books table is partitioned into two partitions based on the publisher year field. Sample data is inserted into the book lending table.
( bookid varchar2(20), programid varchar2(20), cardnumber integer, dateout date, duedate date, primary key(bookid,programid,cardnumber), foreign key(bookid)references book(bookid)on delete cascade, foreign key(programid)references librarybranch(programid)); CREATE TABLE BOOKPART PARTITION BY RANGE (publisheryear) (PARTITION P1 VALUES LESS THAN(2016), PARTITION P2 VALUES LESS THAN (MAXVALUE)) AS SELECT * FROM BOOK
lish
insert into booklending values('c1','f1',11,'01-JAN-2017','01-JUN-2017');
insert into booklending values('c2','f2',12,'03-MAR-2017','04-APR-2017'); insert into booklending values('c3','f3',13,'05-MAY-2017','08-JUN-2017'); insert into booklending values('c4','f4',14,'10-JUN-2017','04-JUL-2017'); insert into booklending values('c5','f5',15,'10-JUL-2017','31-JUL-2017');