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

  1. (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
  1. (DDL ALTER with integrity constraint) Write syntax to change the structure of Customer, ShoppingBasket, ShoppingBasketBook, and Book tables for:
  1. Required Data (Mandatory),
  2. Primary Key (Entity Integrity),
  3. Foreign Key (Referential Integrity)
  1. (DML INSERT) Insert 5 records for each table: Customer, ShoppingBasket, ShoppingBasketBook, and Book
  2. (DML UPDATE) Write syntax to change Price in Book table with 5% increment.
  3. Write Relational Algebra to show:
  1. books that are published within 5 years.
  2. Customers that already had transaction, using Join operator.
  3. Customer email that already had transaction, using Set operator.
  4. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!