Question: ( DDL CREATE ) Write syntax to create Customer , ShoppingBasket , ShoppingBasketBook , and Book tables with Domain Constraint: Book ISBN started with a

- (DDL CREATE) Write syntax to create Customer, ShoppingBasket, ShoppingBasketBook, and Book tables with Domain Constraint:
- Book ISBN started with a character (A-Z) and followed by 11 number character, e.g.: P20190418001
- Year must be greater than 2000
- Price between 10.000 and 100.000
- (DDL ALTER with integrity constraint) Write syntax to change the structure of Customer, ShoppingBasket, ShoppingBasketBook, and Book tables for:
- Required Data (Mandatory),
- Primary Key (Entity Integrity),
- Foreign Key (Referential Integrity)
- (DML INSERT) Insert 5 records for each table: Customer, ShoppingBasket, ShoppingBasketBook, and Book
- (DML UPDATE) Write syntax to change Price in Book table with 5% increment.
- Write Relational Algebra to show:
- books that are published within 5 years.
- Customers that already had transaction, using Join operator.
- Customer email that already had transaction, using Set operator.
- book ISBN that never been bought, using Set operator.
Please answer it thank you
Author Name varchar(255) N Address varchar(255) N URL varchar(255) N Publisher Name varchar(255) N Address varchar(255) N Phone varchar(255) N URL integer(10) N Customer Email varchar(255) Name varchar(255) N Phone varchar(255) N Address varchar(255) N Book ISBN varchar(255) Publisher Name varchar(255) AuthorName varchar(255) AuthorAddress varchar(255) Year integer(10) Title varchar(255) Price numeric19,0) Shopping Basket Book Shopping Basket1D integer(10) BookISBN varchar(255) Count integer(10) Shopping Basket ID integer(10) CustomerEmail varchar(255) N N Warehouse_Book WarehouseCodeinteger(10) Book ISBN varchar(255) Warehouse Code integer (10) Phone varchar(255) N O Address varchar(255) N Count integer(10) N Source: www.visual-paradigm.com%2Fguide%2Fdata-modeling%2Fwhat-is-entity-relationship-diagram
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
