You are on page 1of 2

create database final_project

/* first table*/

create table Tbl_Category


(
CategoryId int primary key identity(1,1), CategoryName varchar(500)
)

/*secound table*/

create table Tbl_Product


(
Product_Id int primary key identity(1,1), ProductName varchar(500), CategoryId int,
Quantity int,
foreign key (CategoryId) references Tbl_Category (CategoryId)
)

/*third table*/

create table Tbl_Customer


(
Customer_Id int primary key identity(1,1), FristName varchar(500), LastName
varchar(500), EmailId varchar(500), Password varchar(500),Product_Id int,
foreign key (Product_Id) references Tbl_Product (Product_Id)
)

/*fourth table*/

create table Tbl_Add_to_Cart


(
product_Id int primary key identity(1,1), customer_Name varchar(200), product_Name
varchar(500),Customer_Id int,
foreign key (Customer_Id) references Tbl_Customer (Customer_Id)
)

/*fifth table*/

create table Tbl_Paments


(
customer_Id int primary key identity(1,1), product_Name varchar(500),Member_Id
varchar(200), product_Id int,
foreign key (product_Id) references Tbl_Add_to_Cart (product_Id)
)

/*sixth table*/

create table Tbl_ShippingDetails


(
ShippingDetail_Id int primary key identity(1,1),customer_Id int, Member_Id int,
[Address] varchar(500), City varchar(500), Country varchar(500), ZipCode int,
OrderId int, AmountPaid decimal,
foreign key (customer_Id) references Tbl_Paments (customer_Id)
)

/*seven table*/

create table Tbl_Store


(
Store_Id int primary key identity(1,1), Store_Name varchar(500), Store_Address
varchar(200), country varchar(200), city varchar(200),
)

You might also like