zoukankan      html  css  js  c++  java
  • 大型运输行业实战_day02_2_数据模型建立

    1.模型分析

    1.基本必备字段

        id   state  type   createTime   updateTime

    2.车票  :   车次   开始车站   到达车站   出发时间    票价    剩余票数     线路id  
    3.线路 :   线路编号 里程线路名称
    4.司机:  名称   驾龄   性别     编号    电话    地址  
    5.车辆:   座位数燃油类型机架号车牌号
    6.车站:  车站名称   车站编号    地点    车站级别   
    7.订单:   订单编号     车票id     用户id        
    8.用户:   用户名   密码    电话   QQ   地址   证件号   
    9.其他:
        字典/菜单/资源/角色

    2.使用powerDesigner建立模型

       

    3.导出sql文件

     1 /*==============================================================*/
     2 /* DBMS name:      MySQL 5.0                                    */
     3 /* Created on:     12/26 14:30:50                               */
     4 /*==============================================================*/
     5 
     6 
     7 drop table if exists login_user;
     8 
     9 drop table if exists ticket;
    10 
    11 drop table if exists ticket_order;
    12 
    13 /*==============================================================*/
    14 /* Table: login_user                                            */
    15 /*==============================================================*/
    16 create table login_user
    17 (
    18    id                   int(32) not null auto_increment,
    19    user_name            varchar(225),
    20    password             varchar(225),
    21    state                varchar(225),
    22    type                 varchar(225),
    23    create_time          datetime,
    24    update_time          datetime,
    25    primary key (id)
    26 );
    27 
    28 /*==============================================================*/
    29 /* Table: ticket                                                */
    30 /*==============================================================*/
    31 create table ticket
    32 (
    33    id                   int(32) not null auto_increment,
    34    start_station        varchar(225),
    35    stop_station         varchar(225),
    36    state                varchar(225),
    37    type                 varchar(225),
    38    price                int(32),
    39    strat_time           datetime,
    40    create_time          datetime,
    41    update_time          datetime,
    42    primary key (id)
    43 );
    44 
    45 /*==============================================================*/
    46 /* Table: ticket_order                                          */
    47 /*==============================================================*/
    48 create table ticket_order
    49 (
    50    id                   int(32) not null auto_increment,
    51    order_number         varchar(225),
    52    user_id              int(32),
    53    ticket_id            int(32),
    54    state                varchar(225),
    55    type                 varchar(225),
    56    create_time          datetime,
    57    update_time          datetime,
    58    primary key (id)
    59 );
    station.sql

      将sql文件导入数据库即可

  • 相关阅读:
    frp反向代理+内网穿透+ Metasploit渗透windows
    FRP实现内网穿透
    FRP 内网穿透工具
    通过代理实现在校园外使用校园网内的服务 (frp内网穿透)
    戴维斯双击
    pycharm2019,3.1版本的有效激活方法
    一键对centos7.6安装python3环境已经pip3
    在linux设置/etc/vimrc 将vim 中后缀.sh的文件 的前几行进行默认输入
    Postman Interceptor和postman更改id仍然无法使用的,从这里下载相同版本的postman和interceptor插件
    Postman Interceptor安装成功却无法在Postman启用的解决办法
  • 原文地址:https://www.cnblogs.com/newAndHui/p/8117839.html
Copyright © 2011-2022 走看看