日期:2014-05-16  浏览次数:20511 次

一个简洁设计系统参数表结构

系统参数表 
--PRM_ENUM_ID枚举值,可以保存数组
-- Create table
create table SYS_PARAM_TAB
(
  PRM_NAME    VARCHAR2(60) not null,
  PRM_ENUM_ID VARCHAR2(10) not null,
  PRM_CN_NAME VARCHAR2(1800),
  PRM_VALUE   VARCHAR2(1600),
  PRM_REMARK  VARCHAR2(255),
  PRM_STATUS  VARCHAR2(1) default '0' not null,
  CREATE_DATE DATE default SYSDATE not null,
  CREATE_BY   VARCHAR2(20) default '999999' not null
);

-- Add comments to the table 
comment on table SYS_PARAM_TAB
  is 'RSS系统参数表';
-- Add comments to the columns 
comment on column SYS_PARAM_TAB.PRM_NAME
  is '参数名称';
comment on column SYS_PARAM_TAB.PRM_ENUM_ID
  is '参数枚举编号';
comment on column SYS_PARAM_TAB.PRM_CN_NAME
  is '参数中文涵义';
comment on column SYS_PARAM_TAB.PRM_VALUE
  is '参数数值';
comment on column SYS_PARAM_TAB.PRM_REMARK
  is '参数备注';
comment on column SYS_PARAM_TAB.PRM_STATUS
  is '参数状态,0-正常 1-审核未通过 2-待审核';
comment on column SYS_PARAM_TAB.CREATE_DATE
  is '创建日期';
comment on column SYS_PARAM_TAB.CREATE_BY
  is '创建人';
-- Create/Recreate primary, unique and foreign key constraints 
alter table SYS_PARAM_TAB
  add constraint PK_SYS_PARAM_TAB primary key (PRM_NAME, PRM_ENUM_ID);
-- Grant/Revoke object privileges 
grant select, insert, update, delete on SYS_PARAM_TAB to PUBDSG;
grant select, insert, update, delete on SYS_PARAM_TAB to R_RSSDATA_DML;
grant select on SYS_PARAM_TAB to R_RSSDATA_QRY;