大家好,又见面了,我是你们的朋友全栈君。
!](https://img-blog.csdnimg.cn/20190614172530353.?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2gwODM0MTcxNzJf,size_16,color_FFFFFF,t_70) 第二层、第三层数据流图不再展示。 E-R图
use Drugstore
--------------------------
create table shop
(
Shopname char(30) primary key not null,
Shoptype char(10) not null,
Shopclass char(10) not null,
Shopcode varchar(20) not null,
Shoparea char(40) not null,
Shopadress char(30) not null,
Shoplat numeric(4,1) not null,
Shoplng numeric(3,1) not null,
Doarea int,
Housearea int,
Shopphone char(20) unique not null
)
-------------------------------------------
create table Worker
(
Wname char(10) primary key not null,
Wcode char(20) not null unique,
Wsex nchar(1) check(Wsex in('男','女')) not null,
Wage int not null,
Wposition char(16) not null
)
----------------------------------------------
create table Firm
(
Firmname char(40) not null,
Firmadress varchar(40) not null unique,
Cname char(60) not null,
Shopname char(30) not null,
primary key(Firmname,Shopname,Cname)
)
--------------------------------------------------
create table Manager
(
Mname char(10) primary key not null,
Wage int not null,
Mcode char(20) not null unique,
Msex nchar(1) not null check(Msex in ('男','女'))
)
----------------------------------------------------
create table Pharmacist
(
Phname char(10) not null,
Shopname char(30) not null,
Phcode char(20) unique,
Phsex nchar(1) not null check(Phsex in('男','女')),
Phage int,
Phtitle char(16) not null,
Phcor nchar(1) check(Phcor in('是','否')),
primary key(Phname,Shopname)
)
------------------------------------------------------
create table Cure
(
Cname char(60) not null primary key,
Firmname char(40) not null,
Cform char(10) not null,
Crank nchar(12) not null,
Clot varchar(20) not null,
Cindate nchar(8),
Csale char(50),
Cnum int,
Cmoney Money,
Cdate datetime
)
----------------------------------------------------
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/124782.html原文链接:https://javaforall.cn