数据库表
create table SZ6_UserInfo(
UserID int
constraint SZ6_UserInfo_pk primary key ,
UserName varchar2(50) not null unique,
UserPwd varchar2(50) not null,
Question Varchar2(50),
Answer Varchar2(50),
UserRealName Varchar2(50),
Sex Varchar2(20),
Address Varchar2(50),
Email Varchar2(50),
Zipcode Varchar2(50));
create sequence SZ6_UserInfo_pk nocache;
insert into sz6_userinfo (userid,username,userpwd) values (sz6_userinfo_pk.nextval,'aaa','123');
create table sz6_type(
typeid int
constraint sz6_type_pk primary key ,
typename varchar2(50) not null
)
create sequence sz6_type_pk nocache;
create table sz6_brand(
brandid int
constraint sz6_brand_pk primary key ,
brandname varchar2(50) not null
)
create sequence sz6_brand_pk nocache;
create table SZ6_ProductInfo(
Productcolum int
constraint SZ6_ProductInfo_pk primary key ,
ProductID int not null unique,
ProductName varchar2(50) not null,
ProductPrice Number(10) not null,
Intro Varchar2(200),
Typeid references sz6_type(typeid),
BrandID references sz6_brand(brandid),
Discount Number(4) not null,
Newpro int ,
Gprferred int,
Gpic Varchar2(50),
Gamount int not null,
Ondate Date not null);
create sequence SZ6_ProductInfo_pk nocache;
create table sz6_category(
categoryID int
constraint sz6_category_pk primary key,
UserID references sz6_userinfo(userid),
ProductID references sz6_productinfo(productid),
CreatedDate date not null,
Quantity int not null);
create sequence sz6_category_pk nocache;
create table sz6_orders(
OrderID int
constraint sz6_orders_pk primary key,
UserID references sz6_userinfo(userid),
OrderDate date not null,
Address Varchar2(50) not null,
Phone Varchar2(50) not null,
Linkman Varchar2(50) not null,
Postcode Varchar2(10) not null,
OrderSum Number(10) not null,
DealDate date not null,
Status int ,
Note Varchar2(200));
create sequence sz6_orders_pk nocache;
create table sz6_OrderItems(
OrderSeq int
constraint sz6_OrderItems_pk primary key,
OrderId references sz6_orders(orderid),
ProductID references sz6_productinfo(productid),
Quantity int not null);
create sequence sz6_OrderItems_pk nocache;
create table sz6_Admins(
AdminID int
constraint sz6_Admins_pk primary key,
LoginName varchar2(50) not null unique,
LoginPwd varchar2(50) not null,
Role int not null);
create sequence sz6_Admins_pk nocache;