1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
   | create database `onlineStore`; use `onlineStore`;
  create table `customer` (     `id`   int(10)     not null,     `name` varchar(10) not null,     primary key `id` (`id`) );
  create table `goods` (     `id`     int(10)     not null,     `shopId` int(10)     not null,     `price`  int(10)     not null,     `name`   varchar(10) not null,     primary key `id` (`id`) );
  create table `shop` (     `id`   int(10)     not null,     `name` varchar(10) not null,     primary key `id` (`id`) );
  create table `openorder` (     `id`         int(10) not null,     `goodsId`    int(10) not null,     `customerId` int(10) not null,     primary key `id` (`id`) );
  create table `closedorder` (     `id`         int(10) not null,     `goodsId`    int(10) not null,     `customerId` int(10) not null,     primary key `id` (`id`) );
   |