/*==============================================================*/
/* Database name: BookShop */
/* DBMS name: sqlServer2000(Extend) */
/* Created on: 2006-8-27 9:07:10 */
/*==============================================================*/
/*==============================================================*/
/* Table: Account */
/*==============================================================*/
create table Account (
ProfileID int not null
/*ProfileID*/,
UserName nvarchar(50) not null
/*UserName*/,
Address nvarchar(100) not null
/*Address*/,
Phone nvarchar(20) not null
/*Phone*/,
Mail nvarchar(50) not null
/*Mail*/,
Country nvarchar(20) not null
/*Country*/,
Code nvarchar(20) not null
/*Code*/
)
go
/*==============================================================*/
/* Table: Cart */
/*==============================================================*/
create table Cart (
ItemID int not null
/*ItemID*/,
ProfileID int not null
/*ProfileID*/,
ProductID int not null
/*ProductID*/,
ProductName nvarchar(50) not null
/*ProductName*/,
Price decimal(10,2) not null
/*Price*/,
Quantity int not null
/*Quantity*/
)
go
/*==============================================================*/
/* Table: Category */
/*==============================================================*/
create table Category (
CategoryID int identity
/*CategoryID*/,
CategoryName nvarchar(50) not null
/*CategoryName*/,
CategoryDescription nvarchar(300) not null
/*CategoryDescription*/,
constraint PK_CATEGORY primary key (CategoryID)
)
go
/*==============================================================*/
/* Table: Item */
/*==============================================================*/
create table Item (
ItemID int identity
/*ItemID*/,
ProductID int null
/*ProductID*/,
SupplierID int null
/*SupplierID*/,
Price decimal(10,2) not null
/*Price*/,
ProductName nvarchar(50) not null
/*ProductName*/,
ProductImage nvarchar(100) not null
/*ProductImage*/,
constraint PK_ITEM primary key (ItemID)
)
go
/*==============================================================*/
/* Table: OrderItem */
/*==============================================================*/
create table OrderItem (
OrderID int null
/*OrderID*/,
ItemID int not null
/*ItemID*/,
LineNumber int not null
/*LineNumber*/,
Quantity int not null
/*Quantity*/,
Price decimal(10,2) not null
/*Price*/
)
go
/*==============================================================*/
/* Table: Orders */
/*==============================================================*/
create table Orders (
OrderID int identity
/*OrderID*/,
OrderDate datetime not null
/*OrderDate*/,
UserName nvarchar(50) not null
/*UserName*/,
BillAddress nvarchar(100) not null
/*BillAddress*/,
BillCode nvarchar(20) not null
/*BillCode*/,
BillCountry nvarchar(20) not null
/*BillCountry*/,
ShipAddress nvarchar(100) not null
/*ShipAddress*/,
ShipCode nvarchar(20) not null
/*ShipCode*/,
ShipCountry nvarchar(20) not null
/*ShipCountry*/,
BillToName nvarchar(50) not null
/*BillToName*/,
ShipToName nvarchar(50) not null
/*ShipToName*/,
TotalPrice decimal(10,2) not null
/*TotalPrice*/,
constraint PK_ORDERS primary key (OrderID)
)
go
/*==============================================================*/
/* Table: Product */
/*==============================================================*/
create table Product (
ProductID int identity
/*ProductID*/,
CategoryID int null
/*CategoryID*/,
ProductName nvarchar(50) not null
/*ProductName*/,
ProductDescription nvarchar(300) not null
/*ProductDescription*/,
ProductImage nvarchar(100) not null
/*ProductImage*/,
constraint PK_PRODUCT primary key (ProductID)
)
go
/*==============================================================*/
/* Table: ProductCount */
/*==============================================================*/
create table ProductCount (
ItemID int null
/*ItemID*/,
Count int not null
/*Count*/
)
go
/*==============================================================*/
/* Table: Profiles */
/*==============================================================*/
create table Profiles (
ProfileID int identity
/*ProfileID*/,
UserName nvarchar(50) not null
/*UserName*/,
LastActivityDate datetime not null
/*LastActivityDate*/,
LastUpdateDate datetime not null
/*LastUpdateDate*/,
ApplicationName nvarchar(50) not null
/*ApplicationName*/,
constraint PK_PROFILES primary key (ProfileID)
)
go
/*==============================================================*/
/* Table: Supplier */
/*==============================================================*/
create table Supplier (
SupplierID int identity
/*SupplierID*/,
SupplierName nvarchar(50) not null
/*SupplierName*/,
Address nvarchar(100) not null
/*Address*/,
Phone nvarchar(20) not null
/*Phone*/,
constraint PK_SUPPLIER primary key (SupplierID)
)
go
alter table Account
add constraint FK_ACCOUNT_REFERENCE_PROFILES foreign key (ProfileID)
references Profiles (ProfileID)
go
alter table Cart
add constraint FK_CART_REFERENCE_ITEM foreign key (ItemID)
references Item (ItemID)
go
alter table Cart
add constraint FK_CART_REFERENCE_PROFILES foreign key (ProfileID)
references Profiles (ProfileID)
go
alter table Item
add constraint FK_ITEM_REFERENCE_PRODUCT foreign key (ProductID)
references Product (ProductID)
go
alter table Item
add constraint FK_ITEM_REFERENCE_SUPPLIER foreign key (SupplierID)
references Supplier (SupplierID)
go
alter table OrderItem
add constraint FK_ORDERITE_REFERENCE_ORDERS foreign key (OrderID)
references Orders (OrderID)
go
alter table Product
add constraint FK_PRODUCT_REFERENCE_CATEGORY foreign key (CategoryID)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
网上书店系统 vs2005 (163个子文件)
AddressForm.ascx 3KB
AddressForm.ascx 3KB
Supplier.ascx 3KB
Supplier.ascx 3KB
ShoppingCartControl.ascx 3KB
ShoppingCartControl.ascx 3KB
ProductIn.ascx 2KB
ProductIn.ascx 2KB
ItemControl.ascx 2KB
ItemControl.ascx 2KB
SearchControl.ascx 1KB
SearchControl.ascx 1KB
AddCategory.ascx 1KB
AddCategory.ascx 1KB
PayControl.ascx 1011B
PayControl.ascx 1011B
Products.ascx 979B
Products.ascx 979B
AddressConfirm.ascx 680B
AddressConfirm.ascx 680B
CartList.ascx 622B
CartList.ascx 622B
ProductEdit.aspx 3KB
ProductEdit.aspx 3KB
CheckOut.aspx 3KB
CheckOut.aspx 3KB
RegisterPage.aspx 2KB
RegisterPage.aspx 2KB
Default.aspx 2KB
Default.aspx 2KB
UserProfile.aspx 1KB
UserProfile.aspx 1KB
Manager.aspx 1KB
Manager.aspx 1KB
DelCategory.aspx 868B
DelCategory.aspx 868B
Login.aspx 578B
Login.aspx 578B
ShoppingCart.aspx 495B
ShoppingCart.aspx 495B
AddCategory.aspx 481B
AddCategory.aspx 481B
SupplierManager.aspx 450B
SupplierManager.aspx 450B
test.aspx 447B
test.aspx 447B
ProductInPage.aspx 445B
ProductInPage.aspx 445B
Items.aspx 436B
Items.aspx 436B
ProductsPage.aspx 419B
Search.aspx 419B
ProductsPage.aspx 419B
Search.aspx 419B
Web.Config 3KB
Web.Config 3KB
SqlBookShopProfileProvider.cs 19KB
SqlBookShopProfileProvider.cs 19KB
BookShopProfileProvider.cs 17KB
BookShopProfileProvider.cs 17KB
Product.cs 13KB
Product.cs 13KB
SqlHelper.cs 12KB
SqlHelper.cs 12KB
Order.cs 8KB
Order.cs 8KB
Category.cs 6KB
Category.cs 6KB
CartItem.cs 4KB
CartItem.cs 4KB
ShoppingCartControl.ascx.cs 3KB
ShoppingCartControl.ascx.cs 3KB
Cart.cs 3KB
Cart.cs 3KB
CheckOut.aspx.cs 3KB
CheckOut.aspx.cs 3KB
AddressForm.ascx.cs 2KB
AddressForm.ascx.cs 2KB
OrderInfo.cs 2KB
OrderInfo.cs 2KB
CartItemInfo.cs 2KB
CartItemInfo.cs 2KB
ItemInfo.cs 2KB
ItemInfo.cs 2KB
MasterPage.master.cs 2KB
MasterPage.master.cs 2KB
AddressInfo.cs 2KB
AddressInfo.cs 2KB
Default.aspx.cs 2KB
Default.aspx.cs 2KB
CustomProfileInfo.cs 2KB
CustomProfileInfo.cs 2KB
LineItemInfo.cs 2KB
LineItemInfo.cs 2KB
ProductInfo.cs 1KB
ProductInfo.cs 1KB
PayControl.ascx.cs 1KB
PayControl.ascx.cs 1KB
AddressConfirm.ascx.cs 1KB
AddressConfirm.ascx.cs 1KB
共 163 条
- 1
- 2
资源评论
niochen
- 粉丝: 14
- 资源: 125
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功