Water and Electricity Payment management system data Sheet Design
SQL Build Table Script:
1--Build Table 2--Manage People Table admin 3 CREATE TABLE admin (4 admin_id varchar2 (3) NOT NULL, 5 admin_loginname VARCHAR2 (8) NOT NULL, 6 Admin_password VARCHAR2 (6) is not NULL, 7 Admin_username VARC HAR2 (4) NOT NULL, 8 constraint Pk_admin primary KEY (ADMIN_ID) 9); Comment in column admin.admin_id is ' Administrator number '; 11 Comment on column admin.admin_loginname is ' administrator login user name ', comment on column Admin.admin_password is ' admin login password '; Comment o N column admin.admin_username is ' administrator name '; 14--User basic information table USER15 CREATE table users (user_id varchar2) not nul l,17 user_loginname VARCHAR2 (8) Not null,18 User_password varchar2 (6) Not null,19 User_username VARCHAR2 (4) Not null,20 user_address varchar2 (a) not null,21 user_ph One number (one) not null,22 constraint Pk_users primary KEY (user_id), Comment on column users.us ER_ID is ' user number '; commeNT on column users.user_loginname is ' user login name '; Comment on column users.user_password is ' user login password '; Comment on column use Rs.user_username is ' user name '; Comment on column users.user_address is ' user address '; Comment on column users.user_phone is ' user power Words '; 30--Water meter water31 CREATE TABLE water (water_id varchar2 (Ten) not null,33 userid VARCHAR2 (Ten) not nul l,34 water_count Number (3,2) not null,35 water_time date not null,36 water_s Tatus number (1) Not null,37 Water_priceid Varchar2 (Ten) not null,38 Water_beforecount Number (3,2) not null,39 constraint Pk_water primary KEY (water_id), Comment on column Water.water_i D is ' water meter number '; Comment on column water.userid is ' user number '; Comment on column water.water_count is ' water meter run '; Comment on col Umn water.water_time is ' water meter time '; Comment on column water.water_status is ' water fee status '; Comment on column water.water_pricei D is ' water price number '; Comment On column Water.water_beforecount was ' last month water meter run '; 48--Water meter power49 CREATE TABLE power (power_id varchar2 (Ten) Not Nu ll,51 userid VARCHAR2 (Ten) not null,52 power_count number (3,2) not null,53 Power_time Date not null,54 power_status number (1) not null,55 Power_priceid varchar2 (+) Not null,56 power_beforecount number (3,2) not null,57 constraint Pk_power primary KEY (POWER_ID) Comment on column power.power_id is ' meter number ', comment on column water.userid is ' user number '; Comment on column P Ower.power_count is ' meter run '; Comment on column power.power_time is ' meter time '; Comment on column power.power_status is ' electricity bill Comment on column Power.power_priceid is ' electricity price number ', comment on column Power.power_beforecount was ' last month meter run '; 66-price Table money67 CREATE TABLE Price (price_id varchar2 (Ten) not null,69 price_time date not null,70 isact Ive number (1) NOT NULL, Waterprice number (2,2) not null,72 powerprice number (2,2) is not NULL, constraint Pk_price Primar Y key (price_id); Comment on column price.price_id is ' price number '; Comment on column price.price_time is ' price date '; ment on column price.isactive is ' price status ', comment on column price.waterprice is ' water price '; Comment on column PRICE.POWERPR Ice is ' electricity price ';
Administrator table:
User table:
Water Tariff:
Electricity meter:
Price list:
(reprint) database table Design-utility Fee Payment System (Oracle)