• 水电缴费管理系统 需求分析与设计


    表的设计

    --管理员表
    create table admin
    (
       a_loginname  varchar2(9)  not null,
       a_password   varchar2(6)  not null
    );
    comment on column admin.a_loginname is'管理员账号(主键)';
    comment on column admin.a_password is '密码';
    alter table admin
    add constraint pk_a primary key(a_loginname);
    add constraint pk_s uniqe (a_password);

    --用户表
    create table users
    (
      u_id        number(4)    not null,
      u_name      varchar2(9)  not null,
      u_password  varchar2(6)  not null,
      u_phone     varchar2(11) not null,
      u_email     varchar2(18),
      u_address   varchar2(27)
    );
    comment on column users.u_id is '编号(主键)';
    comment on column users.u_name is '用户姓名';
    comment on column users.u_password is '用户密码';
    comment on column users.u_phone is '用户电话';
    comment on column users.u_email is'邮件地址';
    comment on column users.u_address is'家庭地址';
    alter table users 
    add constraint pk_u primary key(u_id);
    add constraint PK_P unique (U_PASSWORD)

    --水费表
    create  table water 
    (
      u_id   number(4)    not null,
      u_name varchar2(9)  not null,
      w_month number(4,2) not null,
      w_price number(4,2) not null,
      w_status varchar(6) not null
    );
    comment on column water.u_id is '编号(主键)';
    comment on column water.u_name is'用户姓名';
    comment on column water.w_month is'本月用水量';
    comment on column water.w_price is'本月应交水费';
    comment on column water.w_status is'水费缴付情况';
    alter table water 
    add constraint  pk_w primary key(u_id);

    create table dianfei
    (
      u_id   number(4)      not null,
      u_name varchar(9)     not null,
      d_month number(4,2)   not null,
      d_price number(4,2)   not null,
      d_status varchar2(6)  not null
    );
    comment on column dianfei.u_id is'编号(主键)';
    comment on column dianfei.u_name is'用户姓名';
    comment on column dianfei.d_month is'本月用电量';
    comment on column dianfei.d_price is'本月应交电费';
    comment on column dianfei.d_status is'电费缴付情况';
    alter table dianfei
    add constraint pk_d primary key(u_id);

     

  • 相关阅读:
    AutoCAD如何移动零件和缩放零件图
    AutoCAD如何输入文字
    AutoCAD如何设置A0A1图纸
    AutoCAD如何批量设置线宽
    AutoCAD如何快速标注零件序号
    AutoCAD如何将dwf转成dwg格式
    AutoCAD参照编辑期间不允许使用 SAVE 命令怎么办
    AutoCAD2004启动时出现fail to get CommcntrController的怎么办
    AutoCAD 样条曲线如何结束
    AutoIt3常见问题解答
  • 原文地址:https://www.cnblogs.com/miracle-0807/p/5959067.html
Copyright © 2020-2023  润新知