77范文网 - 专业文章范例文档资料分享平台

物流配送系统数据库设计(SQL)(4)

来源:网络收集 时间:2019-01-27 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

名称数据类型不为空采购表编号IntegerTRUE商品编号IntegerTRUE采购地址Characters TRUE采购日期Date & TimeTRUE主码TRUEFALSEFALSEFALSE c: 供货表

名称数据类型不为空供货表编号IntegerTRUE商品编号IntegerTRUE供货商编号IntegerTRUE供货日期Date & TimeTRUE主码TRUEFALSEFALSEFALSE d: 客户订单表

名称数据类型不为空订单编号IntegerTRUE订单类型Characters (20TRUE商品编号IntegerTRUE订单日期Date & TimeTRUE客户编号IntegerTRUE主码 ITRUEFALSEFALSEFALSEFALSE e: 库存表

名称数据类型不为空库存表编号IntegerTRUE库存日期Date & TimeTRUE管理员编号IntegerTRUE商品编号IntegerTRUE主码TRUEFALSEFALSEFALSE f: 统计报表

名称数据类型不为空报表编号IntegerTRUE报表类型Characters TRUE报表日期Date & TimeTRUE部门编号1IntegerTRUE

主码TRUEFALSEFALSEFALSE 6. 逻辑模型设计

1:PDM图:

订单表业务部门部门编号1int部门名称1char(20)部门电话1intFK_统计报表_RELATIONS_业务部门FK_RELATION_RELATIONS_采购员Relationship_5部门编号1int采购员编号intFK_RELATION_RELATIONS_业务部门采购员采购员编号采购员性别采购员电话采购员地址intchar(2)intchar(30)订单编号部门编号1客户编号2客户_客户编号订单类型商品编号订单日期客户编号intintFK_订单表_RELATIONS_业务部门intintchar(20)intdatetimeintFK_订单表_RELATIONS_客户客户客户姓名客户电话客户地址客户编号客户_客户编号部门编号2char(10)intchar(30)intintint统计报表报表编号部门编号2报表类型报表日期部门编号1intintchar(20)datetimeintRelationship_6采购员编号int采购表编号intFK_RELATION_RELATIONS_采购员FK_RELATION_RELATIONS_采购表采购表采购表编号部门编号3商品编号采购地址采购日期intintintchar(30)datetime财会部门FK_RELATION_RELATIONS_客户FK_RELATION_RELATIONS_财务结算表部门编号3int部门名称3char(20)Relationship_19FK_采购表_RELATIONS_财会部门部门电话3int客户编号intFK_供货表_RELATIONS_财会部门结算表编号int供货表FK_财务结算表_RELATIONS_财会部门FK_客户_RELATIONS_销售部门供货表编号int部门编号3int管理员编号intRelationship_7商品编号int财务结算表采购表编号int供货商编号intFK_RELATION_RELATIONS_供货表供货商编号int结算表编号int供货日期datetimeRelationship_8部门编号3intFK_RELATION_RELATIONS_供货商结算户编号int供货商编号int结算日期datetime供货表编号int供货商FK_RELATION_RELATIONS_供货商Relationship_18FK_RELATION_RELATIONS_供货商销售部门供货商编号intFK_供货表_RELATIONS_库存管理员供货商编号int部门编号2int供货商姓名char(10)FK_RELATION_RELATIONS_财务结算表结算表编号int库存表编号int供货商电话int销售部_部门编号2int供货商地址char(30)部门名称2char(20)部门电话2intFK_RELATION_RELATIONS_采购表库存管理员管理员编号管理员性别管理员电话管理员地址intchar(2)intchar(30)FK_销售部门_RELATIONS_库存表库存表库存表编号管理员编号2库存日期管理员编号商品编号intintdatetimeintintFK_库存表_RELATIONS_库存管理员

七:代码设计

/*==============================================================*/ /* DBMS name: Microsoft SQL Server 2000 */ /* Created on: 2011-1-12 16:51:34 */

/*==============================================================*/

alter table Relationship_18

drop constraint FK_RELATION_RELATIONS_供货商 go

alter table Relationship_18

drop constraint FK_RELATION_RELATIONS_财务结算表 go

alter table Relationship_19

drop constraint FK_RELATION_RELATIONS_客户 go

alter table Relationship_19

drop constraint FK_RELATION_RELATIONS_财务结算表 go

alter table Relationship_5

drop constraint FK_RELATION_RELATIONS_业务部门 go

alter table Relationship_5

drop constraint FK_RELATION_RELATIONS_采购员 go

alter table Relationship_6

drop constraint FK_RELATION_RELATIONS_采购员 go

alter table Relationship_6

drop constraint FK_RELATION_RELATIONS_采购表 go

alter table Relationship_7

drop constraint FK_RELATION_RELATIONS_供货商 go

alter table Relationship_7

drop constraint FK_RELATION_RELATIONS_采购表 go

alter table Relationship_8

drop constraint FK_RELATION_RELATIONS_供货商 go

alter table Relationship_8

drop constraint FK_RELATION_RELATIONS_供货表 go

alter table 供货表

drop constraint FK_供货表_RELATIONS_库存管理员 go

alter table 供货表

drop constraint FK_供货表_RELATIONS_财会部门 go

alter table 客户

drop constraint FK_客户_RELATIONS_客户 go

alter table 客户

drop constraint FK_客户_RELATIONS_销售部门 go

alter table 库存表

drop constraint FK_库存表_RELATIONS_库存管理员 go

alter table 统计报表

drop constraint FK_统计报表_RELATIONS_业务部门 go

alter table 订单表

drop constraint FK_订单表_RELATIONS_客户 go

alter table 订单表

drop constraint FK_订单表_RELATIONS_客户 go

alter table 订单表

drop constraint FK_订单表_RELATIONS_业务部门 go

alter table 财务结算表

drop constraint FK_财务结算表_RELATIONS_财会部门 go

alter table 采购表

drop constraint FK_采购表_RELATIONS_财会部门 go

alter table 销售部门

drop constraint FK_销售部门_RELATIONS_销售部门 go

alter table 销售部门

drop constraint FK_销售部门_RELATIONS_库存表 go

if exists (select 1

from sysindexes

where id = object_id('Relationship_18') and name = 'Relationship_22_FK' and indid > 0 and indid < 255)

drop index Relationship_18.Relationship_22_FK go

if exists (select 1

from sysindexes

where id = object_id('Relationship_18') and name = 'Relationship_23_FK' and indid > 0 and indid < 255)

drop index Relationship_18.Relationship_23_FK go

if exists (select 1

from sysindexes

where id = object_id('Relationship_19') and name = 'Relationship_24_FK' and indid > 0 and indid < 255)

drop index Relationship_19.Relationship_24_FK go

if exists (select 1

from sysindexes

where id = object_id('Relationship_19') and name = 'Relationship_25_FK' and indid > 0 and indid < 255)

drop index Relationship_19.Relationship_25_FK go

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库物流配送系统数据库设计(SQL)(4)在线全文阅读。

物流配送系统数据库设计(SQL)(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/460769.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: