-- Create table
create table RP_USER_T
(
ID NUMBER not null,
NAME VARCHAR2(10),
PASSWORD VARCHAR2(20),
AUTH NUMBER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the columns
comment on column RP_USER_T.AUTH
is '0-admin 1-recorder 2-checker 3-gather';
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_USER_T
add constraint ID_PK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_ACCOUNT_FEE_RECORD_T
(
ID VARCHAR2(20) not null,
CITY_CODE VARCHAR2(8),
PRODUCT_CODE VARCHAR2(10),
ACCOUNT_FEE_TYPE_CODE VARCHAR2(10),
ACCOUNT_RECORD_MONTH DATE,
ACCOUNT_FEE NUMBER(12,2),
ACCOUNT_OPERATOR VARCHAR2(30),
CHECK_STATUS VARCHAR2(1),
CHECK_PERSON VARCHAR2(30),
CHECK_TIME DATE
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_ACCOUNT_FEE_RECORD_T
add constraint ACCOUNT_FEE_ID_PK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table RP_ACCOUNT_FEE_RECORD_T
add constraint ACCOUNT_FEE_CITY_CODE_FK foreign key (CITY_CODE)
references RP_CITY_CODE_T (CITY_CODE);
alter table RP_ACCOUNT_FEE_RECORD_T
add constraint ACCOUNT_FEE_PRODUCT_CODE_FK foreign key (PRODUCT_CODE)
references RP_PRODUCT_CODE_T (PRODUCT_CODE);
-- Create table
create table RP_ACCOUNT_TYPE_CODE_T
(
ACCOUNT_TYPE_CODE VARCHAR2(10) not null,
ACCOUNT_TYPE_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_ACCOUNT_TYPE_CODE_T
add constraint ACCOUNT_TYPE_CODE_PK primary key (ACCOUNT_TYPE_CODE)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_BALANCE_SP_CODE_T
(
BALANCE_SP_CODE VARCHAR2(10) not null,
BALANCE_SP_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_BALANCE_SP_CODE_T
add constraint BALANCE_SP_CODE_PK primary key (BALANCE_SP_CODE)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_BALANCE_TYPE_CODE_T
(
BALANCE_TYPE_CODE VARCHAR2(10) not null,
BALANCE_TYPE_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_BALANCE_TYPE_CODE_T
add constraint BALANCE_TYPE_CODE_PK primary key (BALANCE_TYPE_CODE)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_BUSINESS_FEE_RECORD_T
(
ID VARCHAR2(20) not null,
PRODUCT_CODE VARCHAR2(10),
CITY_CODE VARCHAR2(8),
BUSINESS_TYPE_CODE VARCHAR2(10),
BUSINESS_RECORD_DATE DATE,
BUSINESS_FEE NUMBER(12,2),
RECORD_OPERATOR VARCHAR2(30),
CHECK_PERSON VARCHAR2(30),
CHECK_TIME DATE,
CHECK_STATUS VARCHAR2(1)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_BUSINESS_FEE_RECORD_T
add constraint BUSINESS_FEE_ID_PK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table RP_BUSINESS_FEE_RECORD_T
add constraint BUSINESS_FEE_CITY_CODE_FK foreign key (CITY_CODE)
references RP_CITY_CODE_T (CITY_CODE);
alter table RP_BUSINESS_FEE_RECORD_T
add constraint BUSINESS_FEE_PRODUCT_CODE_FK foreign key (PRODUCT_CODE)
references RP_PRODUCT_CODE_T (PRODUCT_CODE);
alter table RP_BUSINESS_FEE_RECORD_T
add constraint BUS_FEE_BUSINESS_TYPE_CODE_FK foreign key (BUSINESS_TYPE_CODE)
references RP_BUSINESS_FEE_TYPE_CODE_T (BUSINESS_FEE_TYPE_CODE);
-- Create table
create table RP_BUSINESS_FEE_TYPE_CODE_T
(
BUSINESS_FEE_TYPE_CODE VARCHAR2(10) not null,
BUSINESS_FEE_TYPE_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_BUSINESS_FEE_TYPE_CODE_T
add constraint BUSINESS_FEE_TYPE_CODE_PK primary key (BUSINESS_FEE_TYPE_CODE)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_CARD_SALE_RECORD_T
(
ID VARCHAR2(20) not null,
CITY_CODE VARCHAR2(8),
PRODUCT_CODE VARCHAR2(10),
SALE_DATE DATE,
DISCOUNT_RATE NUMBER(5,2),
CARD_SALE_AMOUNT NUMBER(10),
CARD_PAR_VALUE_FEE NUMBER(12,2),
RECORD_OPERATOR VARCHAR2(30),
CHECK_STATUS VARCHAR2(2),
CHECK_PERSON VARCHAR2(30),
CHECK_TIME DATE,
TOTAL_FEE VARCHAR2(10),
DISCOUNT_FEE NUMBER(12,2)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_CARD_SALE_RECORD_T
add constraint CARD_SALE_ID_PK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table RP_CARD_SALE_RECORD_T
add constraint CARD_SALE_CITY_CODE_FK foreign key (CITY_CODE)
references RP_CITY_CODE_T (CITY_CODE);
alter table RP_CARD_SALE_RECORD_T
add constraint CARD_SALE_PRODUCT_CODE_FK foreign key (PRODUCT_CODE)
references RP_PRODUCT_CODE_T (PRODUCT_CODE);
-- Create table
create table RP_CITY_CODE_T
(
CITY_CODE VARCHAR2(6) not null,
CITY_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table RP_CITY_CODE_T
add constraint CITY_CODE_PK primary key (CITY_CODE)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table RP_FEE_SOURCE_CODE_T
(
FEE_SOURCE_CODE VARCHAR2(10) not null,
FEE_SOURCE_NAME VARCHAR2(100) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
)
wwq00709
- 粉丝: 3
- 资源: 12
最新资源
- 数据结构-队列实现银行排队
- (机器学习)kaggle_tabular_Jan_2022-python源码.zip
- (机器学习)kaggle_tabular_Feb_2022-python源码.zip
- 单片机电子密码锁设计,个人学习整理,仅供参考
- 【毕业设计】Linux C C++项目虚拟文件服务器功能匹配百度网盘源码+详细项目说明.zip
- 【毕业设计】MATLAB数字验证码去除斑点带GUI界面源码.zip
- 【毕业设计】MATLAB数字信号仿真系统类似一个教学仿真软件源码.zip
- 【毕业设计】MATLAB图像加密解密方法arnold和混沌显示加密前后图像和灰度直方图带GUI源码.zip
- 【毕业设计】matlab眼部检测的疲劳驾驶系统源码.zip
- 北京PM2.5数据分析【期末大作业】【代码+文档】
- 【毕业设计】Matlab颜色特征和纹理特征的植物叶片虫害侵蚀系统带GUI界面源码.zip
- 【毕业设计】matlab语言进行眼部判别的疲劳检测系统带有人机交互界面源码.zip
- 【毕业设计】MATLAB语音数字识别识别0-9音频识别源码.zip
- 【毕业设计】MATLAB异常行为检测检测行走摔倒打架斗殴等行为带GUI源码.zip
- 【毕业设计】MATLAB运动车辆跟踪检测识别源码.zip
- 【毕业设计】matlab制作的一个人民币识别系统识别金额源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈