电商网站数据库表结构
2016-11-29 12:11:58 0 举报
电商网站数据库表结构通常包括用户表、商品表、订单表、购物车表等。用户表中存储用户的基本信息,如用户名、密码、邮箱等;商品表中存储商品的详细信息,如商品名称、价格、库存等;订单表中存储用户的订单信息,如订单号、下单时间、收货地址等;购物车表中存储用户的购物车信息,如商品ID、数量等。这些表之间通过外键关联,实现数据的一致性和完整性。例如,用户表中的用户名可以作为订单表中的用户ID,商品表中的商品ID可以作为订单表中的商品ID。这样的设计能够有效地管理和维护电商网站的数据库,为用户提供更好的购物体验。
作者其他创作
大纲/内容
orders
- id:int- userId:int- status:int- price:double
+ getProducts()+ onCancle()+ onPay()+ onSend()+ onReceive()
orderProductRefs
- id:int- productId:int- orderId:int- productPrice:double- count:int
+ getValue()
users
- id:int- name:string- email:string- password:string
categories
- id:int- name:string- parentId:int
+ getParent()
products
- id:int- name:string- stock:int- price:double- categoryId
+ isOnSale()+ onSale(num)+ onStorage(num)
productImages
- id:int- url:string- productId:int
+ operation1(params):returnType- operation2(params)- operation3()
0 条评论
下一页