create database DBSHOP
create table tbl_u_country
(
country_code varchar(5) not null,
country_name varchar(100) not null,
constraint tbl_s_country_pk primary key(country_code),
constraint tbl_s_country_u unique(country_name)
)
create table tbl_s_systemuser
(
username varchar(50) not null,
password varchar(50) not null,
user_level varchar(2) not null,
constraint tbl_s_systemuser_pk primary key(username),
constraint tbl_s_systemuser_u unique(user_level)
)
create table tbl_s_customer
(
username varchar(50) not null,
customer_last_name varchar(100) not null,
customer_first_name varchar(100) not null,
customer_address varchar(200) not null,
country_code varchar(5) not null,
mobile_number numeric not null,
phone_number numeric not null,
email_address varchar(100) not null,
constraint tbl_s_customer_pk primary key(username),
constraint tbl_s_customer_fk_u foreign key(username)
references tbl_s_systemuser(username),
constraint tbl_s_customer_fk foreign key(country_code)
references tbl_u_country(county_code),
constraint tbl_s_customer_u unique(email_address)
)
create table tbl_u_category
(
category_code varchar(5) not null,
category_description varchar(100) not null,
constraint tbl_u_category_pk primary key(category_code),
constraint tbl_u_category_u unique(category_description)
)
create table tbl_s_product
(
product_code varchar(10) not null,
product_description varchar(100) not null,
category_code varchar(5) not null,
quantity numeric not null,
price decimal(9,2) not null,
image varchar(100),
constraint tbl_s_product_pk primary key(product_code),
constraint tbl_s_product_fk foreign key(category_code)
references tbl_u_category(category_code),
constraint tbl_s_product_u unique(product_description),
constraint tbl_s_product_chk
check(quantity >= 0 and
price >= 0)
)
create table tbl_t_shop_header
(
transaction_number varchar(10) not null,
shop_date datetime not null,
username varchar(50) not null,
shipping_address varchar(100) not null,
total_amount decimal(9,2) not null,
credit_card_number numeric not null,
constraint tbl_t_shop_header_pk primary key(transaction_number),
constraint tbl_t_shop_header_fk foreign key(username)
references tbl_s_customer(username),
constraint tbl_t_shop_header_chk
check(total_amount >= 0)
)
create table tbl_t_shop_detail
(
transaction_number varchar(10) not null,
product_code varchar(10) not null,
quantity numeric not null,
subtotal decimal(9,2) not null,
constraint tbl_t_shop_detail_pk primary key(transaction_number, product_code),
constraint tbl_t_shop_detail_fk_tn foreign key(transaction_number)
references tbl_t_shop_header(transaction_number),
constraint tbl_t_shop_detail_fk_pc foreign key(product_code)
references tbl_s_product(product_code),
constraint tbl_t_shop_detail_chk
check(quantity >= 0 and
subtotal >= 0)
)
sample value
tbl_s_systemuser
insert into tbl_s_systemuser values('ADMIN', 'admin', 'AD');
insert into tbl_s_systemuser values('temp', 'temp', 'LT');
tbl_u_county_code
insert into tbl_u_country values('CN101', 'ARMENIAN');
insert into tbl_u_country values('CN102', 'CANADA');
insert into tbl_u_country values('CN103', 'CHINA');
insert into tbl_u_country values('CN104', 'JAPAN');
insert into tbl_u_country values('CN105', 'PHILIPPINES');
insert into tbl_u_country values('CN106', 'USA');
tbl_s_product
insert into tbl_s_product values('PRD1000001', 'PALA', 'CT101', '5', '100.00', "")
insert into tbl_s_product values('PRD1000002', 'MARTILYO', 'CT101', '5', '200.00', "")
insert into tbl_s_product values('PRD1000003', 'MASO', 'CT101', '5', '300.00', "")
insert into tbl_s_product values('PRD1000004', 'SEMENTO', 'CT101', '5', '400.00', "")
insert into tbl_s_product values('PRD1000005', 'BALSIG', 'CT101', '5', '500.00', "")
tbl_u_category
insert into tbl_u_category values('CT101', 'HEAVY');
insert into tbl_u_category values('CT102', 'LIGHT');
pg. 918..
没有合适的资源?快使用搜索试试~ 我知道了~
PHP-FINAL.zip_php购物_购物车PHP
共96个文件
php:70个
jpg:15个
gif:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 179 浏览量
2022-09-24
19:03:07
上传
评论
收藏 1.47MB ZIP 举报
温馨提示
这个程序是一个购物车,客户可以通过网站购物
资源推荐
资源详情
资源评论
收起资源包目录
PHP-FINAL.zip (96个子文件)
deleteViewCart.php 659B
aboutUs.php 356B
viewCart.php 629B
viewAccount.php 695B
index.php 352B
content
deleteViewCartContent.php 2KB
passwordContent.php 1010B
homeContent.php 3KB
listOfOrderContent.php 2KB
loginContent.php 593B
viewAccountContent.php 3KB
registerContent.php 2KB
viewAllCartContent.php 3KB
registrationResultContent.php 3KB
productViewContent.php 2KB
missionContent.php 1KB
productAddContent.php 978B
newCartContent.php 2KB
productContent.php 1KB
resultPaymentContent.php 830B
listOfProductContent.php 1016B
visionContent.php 2KB
viewUserContent.php 2KB
viewCartContent.php 3KB
updateViewCartContent.php 2KB
aboutUsContent.php 1KB
payViewCartContent.php 1KB
productUpdateContent.php 2KB
design
theme.css 6KB
mission.php 355B
newCartHandler.php 4KB
template.php 3KB
password.php 642B
documentation
scope and limitation.rtf 2KB
viewCartHandler.php 2KB
image
product
DSC05299.jpg 118KB
MC_Guard_White_LR.jpg 179KB
expedition_pcb.jpg 34KB
lb_07vol_expedition.jpg 84KB
image002.jpg 15KB
tool_roll_hanging.jpg 34KB
tool_roll_closed.jpg 24KB
HDXseries_42.gif 1KB
DSC_0855.jpg 143KB
Thumbs.db 66KB
DSC05083.jpg 101KB
DSC01319.jpg 116KB
Garden-Tools.jpg 166KB
ullman001 022.jpg 182KB
spyglass1300x508.jpg 35KB
expedition_watch.jpg 36KB
vision.gif 24KB
myLogo.gif 5KB
logo.gif 23KB
Thumbs.db 25KB
mission.gif 120KB
traveler.jpg 5KB
vision.php 353B
updateViewCart.php 638B
deleteViewCartHandler.php 482B
viewAccountHandler.php 3KB
product.php 621B
value
value.php 2KB
database
samplePear.php 2KB
storedProcedure.txt 1KB
database_query.txt 4KB
registrationResult.php 147B
productUpdateHandler.php 2KB
listOfOrder.php 637B
home.php 349B
productAdd.php 651B
registerHandler.php 7KB
passwordHandler.php 2KB
newCart.php 639B
payViewCartHandler.php 4KB
viewUser.php 642B
viewAllCart.php 653B
register.php 449B
cartHandler.php 404B
listOfOrderHandler.php 0B
operations
connection.php 76B
unset.php 426B
display_result.php 1020B
unset_transaction.php 918B
productView.php 652B
login.php 456B
updateViewCartHandler.php 2KB
productAddHandler.php 3KB
payViewCart.php 636B
resultPayment.php 670B
productUpdate.php 654B
listOfProduct.php 147B
viewAllCartHandler.php 160B
loginHandler.php 534B
logout.php 237B
productViewHandler.php 546B
共 96 条
- 1
资源评论
局外狗
- 粉丝: 67
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功