Documente Academic
Documente Profesional
Documente Cultură
INTO
INTO
INTO
INTO
INTO
Book
Book
Book
Book
Book
VALUES
VALUES
VALUES
VALUES
VALUES
(1,'Hunger Games','Action',50.0000,5)
(2,'Divergent','Fiction',30.0000,0)
(3,'The Matrix','Science FIction',50.0000,10)
(4,'Peter and Jane','History',40.0000,20)
(5,'Lord of the Rings','Action',80.0000,30)
CREATE TABLE Customer( Customer_ID int not null primary key, Customer_Firstname
varchar(50), Customer_Lastname varchar(50), Customer_Address varchar(50),Custome
r_Contact numeric(18, 0));
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
Customer
Customer
Customer
Customer
Customer
VALUES
VALUES
VALUES
VALUES
VALUES
(1,'John','Smith','Bukit Jalil',165335876)
(2,'Bryan','Arraris','Semenyih',165567090)
(3,'Joshua','Tang','Sri Petaling',165914016)
(4,'Jasmine','Toh','Pudu Raya',125616016)
(5,'Joel','Oon','Ampang',186557203)
INTO
INTO
INTO
INTO
INTO
ShoppingCart
ShoppingCart
ShoppingCart
ShoppingCart
ShoppingCart
VALUES
VALUES
VALUES
VALUES
VALUES
(1,'2015-12-12',
(2,'2015-06-06',
(3,'2016-01-01',
(4,'2016-02-02',
(5,'2015-08-08',
2,
2,
1,
1,
4,
'Delivered',2,1)
'Delivered',3,4)
'In Queue',5,3)
'In Queue',1,4)
'Delivered',1,5)
CREATE TABLE Publisher( Publisher_ID int not null primary key, Publisher_Name va
rchar(50), Publisher_Address varchar(50));
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
Publisher
Publisher
Publisher
Publisher
Publisher
VALUES
VALUES
VALUES
VALUES
VALUES
(1,'Airiti Press','UK')
(2,'Airiti Press','UK')
(3,'Booktrope','Canada')
(4,'Cassell','Brazil')
(5,'ECW Press','UK')
Create TABLE Feedback (Customer_ID int not null primary key, Book_Id int not nul
l foreign key references Book, Book_Rating int, Book_Review varchar(50));
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
CREATE TABLE Invoice( Invoice_NO int not null primary key, Invoice_Date date, Pu
blisher_ID int not null foreign key references Publisher);
INSERT INTO Invoice VALUES (1,'2015-02-02', 2)
INSERT INTO Invoice VALUES (2,'2015-03-03', 5)
INSERT INTO Invoice VALUES (3,'2015-06-06', 4)
CREATE TABLE [Order](Order_ID int not null primary key,Book_Id int foreign key r
eferences Book,Order_Quantity int, Order_Date date, Publisher_ID int not null fo
reign key references Publisher);
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
[Order]
[Order]
[Order]
[Order]
[Order]
VALUES
VALUES
VALUES
VALUES
VALUES
(1,4,50, '2015-06-06',3)
(2,3,100, '2015-04-04',5)
(3,2,50, '2015-03-03',1)
(4,5,50, '2016-01-01',4)
(5,2,50, '2016-01-05',4)
CREATE TABLE Booklist (Booklist_No int not null primary key, Booklist_Date date,
Publisher_Id int not null foreign key references Publisher, Book_Id int not nul
l foreign key references Book);
INSERT
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
INTO
Booklist
Booklist
Booklist
Booklist
Booklist
VALUES
VALUES
VALUES
VALUES
VALUES
(1,'2016-01-21',5,2)
(2,'2015-12-12',4,2)
(3,'2015-04-04',3,2)
(4,'2016-01-01',3,5)
(5,'2015-08-08',1,5)