Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DROP TABLE AUTHORS cascade constraints; DROP TABLE BOOK _ ITEMS cascade constraints; DROP TABLE BOOKS cascade constraints; DROP TABLE BORROWING cascade constraints; DROP TABLE CUSTOMERS

DROP TABLE AUTHORS cascade constraints;
DROP TABLE BOOK_ITEMS cascade constraints;
DROP TABLE BOOKS cascade constraints;
DROP TABLE BORROWING cascade constraints;
DROP TABLE CUSTOMERS cascade constraints;
DROP TABLE WRITING cascade constraints;
CREATE TABLE AUTHORS
( AUTHOR_ID NUMBER(10,0),
LAST_NAME VARCHAR2(30 CHAR),
FIRST_NAME VARCHAR2(20 CHAR),
BIRTH_DATE DATE
) ;
CREATE TABLE BOOK_ITEMS
( BOOK_ITEM_ID VARCHAR2(20 CHAR),
BOOK_ID NUMBER(10,0),
THEORETICAL_VALUE NUMBER(10,2)
) ;
CREATE TABLE BOOKS
( BOOK_ID NUMBER(10,0),
TITLE VARCHAR2(200 CHAR),
ISBN VARCHAR2(13 CHAR),
PUBLISHER VARCHAR2(200 CHAR),
PUBLISHING_DATE DATE,
PRICE NUMBER(8,0),
TOPIC VARCHAR2(30 CHAR),
NUMBER_OF_PAGES NUMBER(4,0)
) ;
CREATE TABLE BORROWING
( CUSTOMER_ID VARCHAR2(20 CHAR),
BOOK_ITEM_ID VARCHAR2(20 CHAR),
BORROWING_DATE DATE,
BORROWING_PERIOD_IN_DAYS NUMBER(3,0) DEFAULT 30,
BRING_BACK_DATE DATE,
LATE_FEE NUMBER(6,0)
) ;
CREATE TABLE CUSTOMERS
( LIBRARY_CARD_NUMBER VARCHAR2(20 CHAR),
LAST_NAME VARCHAR2(30 CHAR),
FIRST_NAME VARCHAR2(20 CHAR),
BIRTH_DATE DATE,
GENDER CHAR(1 CHAR),
ADDRESS VARCHAR2(200 CHAR),
ENROLLMENT_DATE DATE,
MEMBERSHIP_FEE NUMBER(5,0),
CATEGORY VARCHAR2(20 CHAR)
) ;
CREATE TABLE WRITING
( AUTHOR_ID NUMBER(10,0),
BOOK_ID NUMBER(10,0),
ROYALTY NUMBER
) ;
Insert into AUTHORS (AUTHOR_ID,LAST_NAME,FIRST_NAME,BIRTH_DATE) values ('2005182601','Christie','Agatha',to_date('1890-09-15','YYYY-Mm-DD'));
Insert into AUTHORS (AUTHOR_ID,LAST_NAME,FIRST_NAME,BIRTH_DATE) values ('2005182602','Banner','A. J.',to_date('1966-05-21','YYYY-Mm-DD'));
Insert into AU

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions