药店管理系统论文 下载本文

长春工业大学人文信息学院 11043113号 林安琪毕业论文

表3-7 用户信息表(users)

字段名 userid username password truename Sex question answer email phone usertype 字段类型 Int Varchar(50) Varchar(50) Varchar(50) Bit Varchar(50) Varchar(50) Varchar(50) Varchar(50) Int 是否为空 N N N N N N N Y N Y 说明 用户唯一id,自动增量 仓库名称 仓库所在地址 仓库描述 性别 1表示男,0表示女 密码问题 问题答案 email 电话 用户类型,暂时未使用该字段 3.3.4数据库的物理结构设计 1.创建库存信息表

create table stores (

Storeid int(4) primary key not null, Name varchar(200) not null default, Address varchar(200) not null default, Description varchar(200) not null default )

第 24 页

共 37 页

长春工业大学人文信息学院 11043113号 林安琪毕业论文

2.创建存储规则表

create table storerule (

Uid bigint primary key not null, Medicalid bigint not null default, Storied int(4) not null default, Topcount int(4) not null default, Basecount int(4) not null default, Curcount int(4) not null default )

3.创建出入库记录表

create table outinrecords (

Uid bigint primary key not null, Medicalid bigint not null default, Storied int(4) not null default, Stype bit not null default, Tcunt int(4) not null default, Managerid int(4) not null default, Shandler ivarchar(200) not null default, Opdate smalldatetime not null default )

4.创建药品信息表

create table medical

共 37 页

第 25 页

长春工业大学人文信息学院 11043113号 林安琪毕业论文

(

Medicalid bigint primary key not null, Cname varchar(200) not null default, Tiaoma varchar(200) not null default, Bianma varchar(200) not null default, Jiliang varchar(200) not null default, Pici varchar(200) not null default, Jinjia money not null default, Shoujia money not null default, Dazhelv Float not null default, Outdate Smalldatetime not null default, Pertime Smalldatetime not null default, Prodcorp varchar(200) not null default, Provider1 varchar(200) not null default, Provider2 varchar(200) not null default )

5.创建药品采购计划表

create table medical (

uid int primary key not null, status bt not null default, medicalid bigint not null default, Tcount int(4) not null default,

共 37 页

第 26 页

长春工业大学人文信息学院 11043113号 林安琪毕业论文

Zongjia money not null default, Provider varchar(200) not null default, Makeuserid int not null default, Makedate Smalldatetime not null default, Execuser varchar(200) not null default, Execdate Smalldatetime not null default )

6.创建销售记录表

create table medical (

Uid bigint primary key not null, Opdate smalldatetime not null default, Medicalid bigint not null default, Tcount int not null default, Opuserid int not null default, Zongjia money not null default, Recipeid varchar(50) not null default )

7.创建用户信息表

create table users (

userid int primary key not null, username varchar(50) not null default,

共 37 页

第 27 页