按关键词阅读: 管理 课程设计 销售 数据库 医药
14、.4物理设计数据库的物理结构是指数据库在物理设备上的存储结构与存取方法 , 依赖于给定的计算机系统 。
通过上一阶段的逻辑设计选取了一个最适合应用要求的物理结构的设计 。
2.1.5数据库的实现数据库实现是运用DBMS提供的DDL数据语言定义数据库结构 , 组织数据入库 , 编写与调试应用程序 。
数据表设计通过对关系模式的优化 , 得到六个基本表:表31药品信息表字段名字段类型长度主键或外键字段值约束对应中文属性名MedicineCodeChar6Primary KeyNot Null药品编码MedicineNameVarchar32Not Null药品名称PriceMoney8售价ListPriceMoney8进价N 。
15、umberInt4库存量FirmCodeChar4Not Null供应商编码表3-2供应商信息字段名字段类型长度主键或外键字段值约束对应中文属性名FirmCodeChar4Primary KeyNot Null供应商编码FirmNameVarchar16Not Null供应商名称LinkVarchar12联系人CityVarchar8所在城市表3-3药品销管理表字段名字段类型长度主键或外键字段值约束对应中文属性名SaleNoint4Primary KeyNot Null销售编码MedicinecodeChar6Foreign keyNot Null药品编码MedicineNameVarchar 。
16、32Not Null药品名称PriceMoney8售价NumberInt4数量AmountMoney8金额SaleDateDatetime8销售日期表3-4用户信息字段名字段类型长度主键或外键字段值约束对应中文属性名WorkNoChar2Primary KeyNot Null员工号NameVarchar12姓名UserRegNameChar3Not Null用户名PasswordMoney3Not Null用户口令PositionMoney10用户职位PowerInt10用户权限该系统数据库设计部分代码Table: FirmInfor create table FirmInfor (FirmC 。
17、ode char(4) not null,FirmName varchar(16) not null,Link varchar(12),LinkTell char(11),City varchar(8),primary key (FirmCode);
Table: MedInfor create table MedInfor (MedicineCode char(4) not null,MedicineName varchar(32) not null,MedKindCode char(1) not null,Price numeric(8,2),ListPrice numeric(8,2),S 。
18、tockNum varchar(4),Unit char(2),UsefulLife timestamp,RatifyCode varchar(10),primary key (MedicineCode);
Table: MedKindInfor create table MedKindInfor (MedKindCode char(1) not null,KindExplanation varchar(16),primary key (MedKindCode);
Table: SupplyInfor create table SupplyInfor (MedicineCode char(4) n 。
19、ot null,FirmCode char(4) not null,MedicineName varchar(32),Number varchar(4),Unit char(2),ListPrice numeric(8,2),Amount numeric(8,2),primary key (MedicineCode, FirmCode);
Index: Relationship_3_FK create index Relationship_3_FK on SupplyInfor (MedicineCode ASC);
Index: Relationship_4_FK create index Re 。
20、lationship_4_FK on SupplyInfor (FirmCode ASC);
Table: UserInfor create table UserInfor (UserRegName char(6) not null,Password char(8) not null,Position varchar(10) not null,Power char(4),primary key (UserRegName);
alter table MedInforadd foreign key FK_MEDINFOR_RELATIONS_MEDKINDI (MedKindCode)referenc 。
21、es MedKindInfor (MedKindCode)on update restricton delete restrict;
alter table SupplyInforadd foreign key FK_SUPPLYIN_RELATIONS_MEDINFOR (MedicineCode)references MedInfor (MedicineCode)on update restricton delete restrict;
alter table SupplyInforadd foreign key FK_SUPPLYIN_RELATIONS_FIRMINFO (FirmCode 。
【医药|医药销售管理数据库课程设计】22、)references FirmInfor (FirmCode)on update restricton delete restrict;
2.2系统主要功能模块设计(可用流程图表示)客 户医药销售管理系统员工供应商发货 , 退货订 货查 询验 证进货(系统顶层数据流程图)药品入库药品出库药品销售药品退货入库信息库出库信息库销售信息库退货信息库药品信息库员工信息库客户信息库员工管理供货单入库清单入库记录出库记录出货单员工信息出库清 单销售信息退货信息销售清单(系统0层数据流程图)主要模块代码登录:Private Sub Command2_Click()Me.HideEnd SubPrivate Su 。
23、b Option1_Click()End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = Chr(32) ThenText2.SetFocusEnd IfEnd SubPrivate Sub Text2_GoFocus()Adodc1.RecordSource = select * from power2 where userregname= & Text1 & Adodc1.RefreshEnd IfIf Adodc1.Recordset.EOF ThenMsgBox 无此用户 , 请重新输入!, , 提示Text1 。
24、.Text = Text1.SetFocusEnd IfEnd SubPrivate Sub Text2_Change()Adodc1.RecordSource = select * from power2 where userregname= & Text1 & Adodc1.RefreshEnd IfEnd Sub基础信息管理:Private Sub Command1_Click()On Error Resume NextCommand2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = TrueCommand5.Enabl 。
25、ed = FalseIf Command1.Caption = 添加 ThenCommand1.Caption = 确认Adodc1.Recordset.AddNewText4.SetFocusElseCommand1.Caption = 添加Adodc1.Recordset.UpdateAdodc1.Recordset.MoveLastCommand2.Enabled = TrueCommand3.Enabled = TrueCommand5.Enabled = TrueEnd IfEnd SubPrivate Sub Command2_Click()On Error Resume Next 。
稿源:(未知)
【傻大方】网址:/a/2021/0822/0023893471.html
标题:医药|医药销售管理数据库课程设计( 三 )