12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- drop database if exists ShoppingWebsite;
- create database if not exists ShoppingWebsite;
- use ShoppingWebsite;
- /* node*/
- create table if not exists nodeinfo
- (
- id bigint not null primary key,
- prev_id bigint null,
- next_id bigint null,
- parent_id bigint null,
- child_id bigint null,
- obj_type varchar(100) default 'group04.BasicNode'
- );
- /* node stuctor
- userAccount
- + cart
- + user_cart[]
- + collect
- + goods[]
- */
- create table if not exists userAccount
- (
- userId bigint not null,
- email varchar(50) not null,
- password varchar(16) not null,
- permission int not null default 0,
- primary key(email,userId)
- );
- /*goods*/
- create table if not exists user_cart
- (
- user_Cart_Id bigint not null primary key,
- count int not null,
- );
- /* node stuctor
- store
- + goods[]
- + selectionGroup[]
- + selection[]
- + comment[]
- */
- create table if not exists store
- (
- store_Id bigint not null primary key,
- postion varchar(100) not null,
- name varchar(50) not null,
- star int
- );
- create table if not exists goods
- (
- goods_id bigint not null primary key,
- postion varchar(100) not null,
- name varchar(50) not null,
- star int
- );
- create table if not exists selection_group
- (
- selection_group_id bigint not null primary key,
- name varchar(50) not null
- );
- create table if not exists selection
- (
- selection_id bigint not null primary key,
- name varchar(50) not null,
- price float(13,2)
- );
|