DEFINE TABLE AUTHORS WITH COLUMNS AUTHORID INT AND AUTHORNAME VARCHAR(30),ADD COLUMN LEVEL PRIMARY KEY CONSTRAINT FOR AUTHORID, ADD COLUMN LEVEL NOT NULL CONSTRAINT FOR AUTHORNAME
DEFINE TABLE AUTHORS WITH COLUMNS AUTHORID INT AND AUTHORNAME VARCHAR(30),ADD COLUMN LEVEL PRIMARY KEY CONSTRAINT FOR AUTHORID, ADD COLUMN LEVEL NOT NULL CONSTRAINT FOR AUTHORNAME
2. DEFINE TABLE PUBLISHERS WITH COLUMNS PUBLISHERID INT AND PUBLISHERNAME
VARCHAR(30), ADD TABLE LEVEL PRIMARY KEY CONSTRAINT FOR PUBLISHERID, ADD
TABLE LEVEL UNIQUE CONSTRAINT FOR PUBLISHERNAME
3. ADD NEW COLUMN(CITY VARCHAR(20)) TO PUBLISHERS TABLE
4. SET CITY OF PUBLISHER CAN YAYINLARI TO ˙ISTANBUL
5. DEFINE TABLE NAMED BOOKS WITH COLUMNS BOOKID INT, TITLE VARCHAR(30), AUTHORID ?, PUBLISHERID ?, GENRE VARCHAR(20), ADD FOREIGN KEY CONSTRAINT PUBLISHERID, ADD FOREIGN KEY CONSTRAINT AUTHORID WITH ON DELETE CASCADE
6. ALTER TABLE BOOKS AND ADD NEW PRIMARY KEY CONSTRAINT FOR BOOKID
7. ADD NEW COLUMN (PRIZE NUMERIC(5,2)) FOR BOOKS TABLE
8. ALTER TABLE BOOKS AND ADD NEW CHECK CONSTRAINT FOR PRIZE ≥ 5.00
9. ADD NEW COLUMN (NATION CHAR(2)) FOR AUTHORS TABLE
10. CREATE VIEW BOOKSVIEW WITH AUTHORS, BOOK TITLES AND PRIZE
11. CREATE VIEW PUBVIEW OF PUBLISHERS WITH ID AND NAME
Step by Step Solution
3.41 Rating (167 Votes )
There are 3 Steps involved in it
Step: 1
It seems like youre providing a series of SQL statements to define tables modify them and create views However there are a few issues and corrections ...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started