⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hd.sql

📁 一个简单的酒店管理系统 用VB.net+SQL2000实现
💻 SQL
字号:
CONNECT TO TTT;
CREATE TABLE hsm_dw (
        dwbm char (9) NOT NULL ,
        dwmc char (8) NOT NULL ,
        dwjb char (4) NOT NULL ,
        hybb char (2) NOT NULL ,
        czbb char (2) NOT NULL ,
        dwqc char (30) NOT NULL ,
        CONSTRAINT PK_dw_1__13 PRIMARY KEY
        (
                dwbm

        )
);



CREATE TABLE hsc_cbdj (
        cbid char (9) NOT NULL ,
        sfkh char (14) NOT NULL ,
        cbdjh char(10) ,
        gsbm char (4) NOT NULL ,
        cblx char (2) NOT NULL ,
        cjbm char (4) NOT NULL ,
        cmch char (16) NOT NULL ,
        syr char (8) NOT NULL ,
        syrz char (18) NOT NULL ,
        jyr char (8) NOT NULL ,
        jyrz char (18) NOT NULL ,
        sxw char (10) NOT NULL ,
        zd numeric (5,0) NOT NULL ,
        jdw numeric (5,0) NOT NULL ,
        zzda numeric (5,0) NOT NULL ,
        zzdb numeric (5,0) NOT NULL ,
        zzdc numeric (5,0) NOT NULL ,
        gl numeric  (4,0) NOT NULL ,
        xc numeric  (5,1) NOT NULL ,
        xk numeric  (5,1) NOT NULL ,
        xs numeric  (5,1) NOT NULL ,
        djrq date NOT NULL,
        djsj time NOT NULL ,
        djcj char (4) NOT NULL ,
        djdw char (4) NOT NULL ,
        djzd char (2) NOT NULL ,
        djczy char (2) NOT NULL ,
        yhrq date NOT NULL ,
        CONSTRAINT PK___4__14 PRIMARY KEY
        (
                cbid
        )
);


CREATE TABLE hsc_cbzl (
        zlbm char (2) NOT NULL ,
        zlmc char (6) NOT NULL ,
        CONSTRAINT PK___1__12 PRIMARY KEY
        (
                zlbm
        )
);


CREATE TABLE hsc_cjd (
        cjbm char (4) NOT NULL ,
        cjmc char (16) NOT NULL ,
        CONSTRAINT PK___2__12 PRIMARY KEY
        (
                cjbm
        )
);


CREATE TABLE hsc_jfls (
        cbid char (9) NOT NULL ,
        sfkh char (14) not null,
        fzbm char (6) NOT NULL ,
        sfje numeric(10,2) NOT NULL ,
        jjqx char (10) NOT NULL ,
        lsh numeric(9,0) not null,
        primary key
        (
          sfkh,
          lsh
        )
);

CREATE TABLE hsc_sfzl (
        fzbm char (6) NOT NULL ,
        fzmc char (20) NOT NULL ,
        sfdw char (10) NOT NULL ,
        fzjc char (10) NOT NULL ,
        sfdx char (20) NOT NULL ,
        sfbz numeric(8, 2) NOT NULL ,
        sfxm char (10) NOT NULL ,
        dyft char (1) NOT NULL ,
        CONSTRAINT PK___1__17 PRIMARY KEY
        (
                fzbm
        )
);

CREATE TABLE hsm_czls (
        jybm char (4) NOT NULL ,
        jrrq date NOT NULL ,
        jrsj time  NOT NULL ,
        tcsj time  NOT NULL ,
        zxjg char (20) NOT NULL ,
        dwbm char (4) NOT NULL ,
        zdbm char (2) NOT NULL ,
        czybm char (2) NOT NULL
);

CREATE TABLE hsm_czydy (
        dwbm char (4) NOT NULL ,
        czybm char (2) NOT NULL ,
        xm char (20) NOT NULL ,
        sfz char (18) NOT NULL ,
        swmm char (36) NOT NULL ,
        jb char (2) NOT NULL ,
        qx char (20) NOT NULL ,
        sqm char (6) NOT NULL,
        CONSTRAINT PK___1__16 PRIMARY KEY
        (
                dwbm,
                czybm
        )
);

CREATE TABLE HSM_JYDY (
        JYBM char (4) NOT NULL ,
        JYMC char (20) NOT NULL ,
        CXMC char (20) NOT NULL ,
        QX char (20) NOT NULL ,
        CONSTRAINT PK___1__13 PRIMARY KEY
        (
                JYBM
        )
);


CREATE TABLE kj_km (
        txbm char (4) NOT NULL ,
        ssnf numeric(4, 0) NOT NULL ,
        kmbm char (12) NOT NULL ,
        kmmc char (18) NOT NULL ,
        xzbj char (1)  ,
        jncs numeric(13, 2) NOT NULL ,
        dncs numeric(13, 2) NOT NULL ,
        j1 numeric(13, 2) NOT NULL ,
        d1 numeric(13, 2) NOT NULL ,
        j2 numeric(13, 2) NOT NULL ,
        d2 numeric(13, 2) NOT NULL ,
        j3 numeric(13, 2) NOT NULL ,
        d3 numeric(13, 2) NOT NULL ,
        j4 numeric(13, 2) NOT NULL ,
        d4 numeric(13, 2) NOT NULL ,
        .+- 
        j5 numeric(13, 2) NOT NULL ,
        d5 numeric(13, 2) NOT NULL ,
        j6 numeric(13, 2) NOT NULL ,
        d6 numeric(13, 2) NOT NULL ,
        j7 numeric(13, 2) NOT NULL ,
        d7 numeric(13, 2) NOT NULL ,
        j8 numeric(13, 2) NOT NULL ,
        d8 numeric(13, 2) NOT NULL ,
        j9 numeric(13, 2) NOT NULL ,
        d9 numeric(13, 2) NOT NULL ,
        j10 numeric(13, 2) NOT NULL ,
        d10 numeric(13, 2) NOT NULL ,
        j11 numeric(13, 2) NOT NULL ,
        d11 numeric(13, 2) NOT NULL ,
        j12 numeric(13, 2) NOT NULL ,
        d12 numeric(13, 2) NOT NULL ,
        j13 numeric(13, 2) NOT NULL ,
        d13 numeric(13, 2) NOT NULL ,
        ncsc char (2) ,
        cwdwbm char (4) NOT NULL ,
        CONSTRAINT PK___4__13 PRIMARY KEY
        (
                cwdwbm,
                txbm,
                ssnf,
                kmbm
        )
);

CREATE TABLE XT_XCKZ (
        pro_code char (10) NOT NULL ,
        pro_name char (20) NOT NULL ,
        pro_date date NOT NULL ,
       pro_time time NOT NULL,
        CONSTRAINT PK___1__10 PRIMARY KEY
        (
                pro_code
        )
);

CREATE TABLE zw_tx (
        dwbm char (4) NOT NULL ,
        txbm char (4) NOT NULL ,
        txmc char (30) NOT NULL ,
        ssnf char (4) NOT NULL ,
        xzbj char (1) NOT NULL ,
        dwmc char (8) NOT NULL ,
        dwjb char (4) NOT NULL ,
        CONSTRAINT PK___2__10 PRIMARY KEY
        (
                txbm,
                ssnf,
                dwbm
        )
);

create table hsm_dwdy
(
        dwbm    char(4) not null,
        dwmc    char(20),
        bgdz    char(40),
        yzbm    char(6),
        tele    char(14),
        lxr     char(10),
        dwxz    char(2),
        dwqx    char(20),
        dwxx    char(2),
        constraint dwdw_dwbm primary key
        (
                dwbm
        )
);


create table hsm_gsdy
(
        gsbm char(4) not null,
        gsmc char(20) not null,
        bgdz char(40),
        yzbm char(6),
        tele char(14),
        frdb char(10),
        constraint gsdy_gsbm_01 primary key
        (
                gsbm
        )
);


CREATE TABLE hcm_xtcs (
        DWBM char (4) NOT NULL ,
        ZDBM char (2) NOT NULL ,
        LSID char (9) NOT NULL ,
        PZID char (9) NOT NULL ,
        JBSJ numeric (3,0) NOT NULL ,
        XCRQ date NOT NULL ,
       XCSJ time NOT NULL,
        CONSTRAINT PK___3__13 PRIMARY KEY
        (
                DWBM
        )
);
CREATE TABLE hsm_xtcs (
        CBID char (9) NOT NULL ,
        JBSJ numeric(3,1) NOT NULL ,
        CONSTRAINT PK___2__13 PRIMARY KEY
        (
                CBID
        )
);

CREATE TABLE hsm_zddy (
        dwbm char (4) NOT NULL ,
        zdbm char (4) NOT NULL ,
        xz char (2) NOT NULL ,
        swtel char (14) NOT NULL ,
        sbmc char (20) NOT NULL ,
        xh char (20) NOT NULL ,
        sbbh char (2) NOT NULL ,
        jz numeric(10, 2) NOT NULL ,
        gzrq date NOT NULL ,
        sbzrr char (8) NOT NULL ,
        sbsyr char (8) NOT NULL ,
        zjly char (10) NOT NULL ,
        xsxh char (2) NOT NULL ,
        scrq date NOT NULL ,
       scsj time NOT NULL ,
        CONSTRAINT PK___3__12 PRIMARY KEY
        (
                dwbm,
                zdbm
        )
);


create table hsc_sfls
(
        cbid    char(9),
        pjxh    char(16) not null,
        sfkh    char(14) not null,
        sfrq    date not null,
        fzbm    char(6),
        jfjs    numeric(5,0),
        sfbz    numeric(8,2),
        sfje    numeric(10,2),
        sfstr   date,
        sfend   date,
        sfdw    char(4),
        sfzd    char(4),
        hzbm    char(2),
        sxft    char(1),
        sfczy   char(3),
        lsh     numeric(9,0) not null,
        primary key
        (
                pjxh,
                sfkh,
                sfrq,
                lsh
        )
);

create table hsc_lsgd
(
        cbid    char(9),
        pjxh    char(16) not null,
        sfkh    char(14) not null,
        sfrq    date not null,
        fzbm    char(6),
        jfjs    numeric(5,0),
        sfbz    numeric(8,2),
        sfje    numeric(10,2),
        sfstr   date,
        sfend   date,
        sfdw    char(4),
        sfzd    char(4),
        hzbm    char(2),
        sxft    char(1),
        sfczy   char(3),
        lsh     numeric(9,0) not null,
        primary key
        (
                pjxh,
                sfkh,
                sfrq,
                lsh
        )
);

create table zkzcjbkmxhzb
(
        xh char(2),
        a char(30),
        b char(20),
        c char(20),
        d char(20),
        e char(8),
        f char(20),
        g char(20),
        h char(20),
        i char(8),
        j char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table zcfzb
(
        xh char(2),
        a char(4),
        b char(20),
        c char(20),
        d char(20),
        e char(4),
        f char(20),
        g char(20),
        h char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        jsh char(2) not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                jsh,
                zxh
        )
);

create table zkzcjbkmxb
(
        xh char(2),
        a char(30),
        b char(20),
        c char(20),
        d char(20),
        e char(8),
        f char(20),
        g char(20),
        h char(20),
        i char(8),
        j char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table srzcb
(
        xh char(2),
        a char(20),
        b char(20),
        c char(20),
        d char(20),
        e char(20),
        f char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table syzcmxb
(
        xh char(2),
        a char(12),
        b char(30),
        c char(20),
        d char(20),
        e char(20),
        f char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table hdjyjczsrdzb
(
        xh char(2),
        a char(8),
        b char(50),
        c char(20),
        d char(20),
        e char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table jfbfdzb
(
        xh char(2),
        a char(40),
        b char(20),
        c char(20),
        d char(20),
        f char(20),
        h char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table jjbdqkb
(
        xh char(2),
        a char(30),
        b char(20),
        c char(20),
        d char(20),
        e char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);

create table jyzcmxb
(
        xh char(2),
        a char(12),
        b char(30),
        c char(20),
        d char(20),
        e char(20),
        f char(20),
        zwtxh char(4) not null,
        dwh char(4) not null,
        rq date not null,
        zxh numeric(4,0) not null,
        primary key
        (
                zwtxh,
                dwh,
                rq,
                zxh
        )
);


create table cw_sj
(
        cwdwbm char(4) not null,
        txbm char(4) not null,
        ssnf numeric(4,0) not null,
        mon numeric(2,0) not null,
        ri numeric(2,0),
        pzh numeric(3,0) not null,
        lsh numeric(2,0) not null,
        fj numeric(3,0),
        zd char(10),
        fhr char(10),
        kmbm char(12),
        jje numeric(13,2),
        dje numeric(13,2),
        jy char(44),
        primary key
        (
                cwdwbm,
                txbm,
                ssnf,
                mon,
                pzh,
                lsh
        )
);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -