数据库10.12水费管理系统相关表格设计.....修改
生活随笔
收集整理的這篇文章主要介紹了
数据库10.12水费管理系统相关表格设计.....修改
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
-- Create table
create table ADMIN
(gno VARCHAR2(4) not null,gpassword VARCHAR2(8) not null,gname VARCHAR2(9) not null,gphone VARCHAR2(11)
);
-- Add comments to the columns
comment on column ADMIN.gnois '管理員編號';
comment on column ADMIN.gpasswordis '管理員密碼';
comment on column ADMIN.gnameis '管理員姓名';
comment on column ADMIN.gphoneis '管理員電話';-- Create/Recreate primary, unique and foreign key constraints
alter table ADMINadd constraint PK_GNO primary key (GNO);
?
-- Create table create table USERZ (uno VARCHAR2(4) not null,uname VARCHAR2(9) not null,upassword VARCHAR2(8) not null,uphone VARCHAR2(11),usfje NUMBER(8,2) not null,udfje NUMBER(8,2) not null,uzje NUMBER(8,2) not null,udate DATE not null );-- Add comments to the columns comment on column USERZ.unois '用戶編號(主鍵)'; comment on column USERZ.unameis '用戶姓名'; comment on column USERZ.upasswordis '用戶密碼'; comment on column USERZ.uphoneis '用戶電話'; comment on column USERZ.usfjeis '水費金額'; comment on column USERZ.udfjeis '電費金額'; comment on column USERZ.uzjeis '水電費總金額'; comment on column USERZ.udateis '繳費日期';-- Create/Recreate primary, unique and foreign key constraints alter table USERZadd constraint PK_UNO primary key (UNO);
?
?
?
-- Create table 水費表 create table WATER (uno VARCHAR2(4) not null,wmonth CHAR(6) not null,wyl NUMBER(8,2) not null,usfje NUMBER(6,2) not null,wsfjf CHAR(6) not null ); -- Add comments to the columns comment on column WATER.unois '用戶編號(外鍵)'; comment on column WATER.wmonthis '月份'; comment on column WATER.wylis '本月用水量'; comment on column WATER.usfjeis '水費金額'; comment on column WATER.wsfjfis '是否繳費'; -- Create/Recreate primary, unique and foreign key constraints alter table WATERadd constraint FK_W_UNO foreign key (UNO)references USERZ (UNO);
?
?
?
?
?
?
?
-- Create table 電費單 create table POWER (uno VARCHAR2(4) not null,pmonth CHAR(5) not null,pyl NUMBER(8,2) not null,udfje NUMBER(8,2),psfjf CHAR(6) not null ); -- Add comments to the columns comment on column POWER.unois '用戶編號(外鍵)'; comment on column POWER.pmonthis '電表月份'; comment on column POWER.pylis '用電量'; comment on column POWER.udfjeis '電費金額'; comment on column POWER.psfjfis '是否繳費'; -- Create/Recreate primary, unique and foreign key constraints alter table POWERadd constraint FK_P_UNO foreign key (UNO)references USERZ (UNO);
?
?
?
-- Create table create table MONEY (mmonth CHAR(5) not null,mwater NUMBER(4,2) not null,mpower NUMBER(4,2) not null ); -- Add comments to the columns comment on column MONEY.mmonthis '價格變更月份'; comment on column MONEY.mwateris '水費價格'; comment on column MONEY.mpoweris '電費價格';
?
轉載于:https://www.cnblogs.com/liuyanzeng/p/5956095.html
總結
以上是生活随笔為你收集整理的数据库10.12水费管理系统相关表格设计.....修改的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 海量优质大屏素材,下载即可实现酷炫可视化
- 下一篇: Hibernate 学习教程