当前位置:网站首页>仓库管理数据库系统设计
仓库管理数据库系统设计
2022-04-23 19:28:00 【x 心 动】
第1关:数据库表设计 - 核心表创建
#ÇëÔÚ´ËÌí¼ÓʵÏÖ´úÂë
########## Begin ##########
#ÔÚwarehouse_db¿âÖд´½¨warehouse±í
use warehouse_db;
create table warehouse(
warehouseId int(11) primary key,
area int(11) not null,
phone int(11) not null
);
#ÔÚwarehouse_db¿âÖд´½¨component±í
create table component(
componentId int(11) primary key,
componentName varchar(20) not null,
standard varchar(255) not null,
price double(10,2) not null,
`describe` varchar(255) not null
);
#ÔÚwarehouse_db¿âÖд´½¨supplier±í
create table supplier(
supplyId int(11) primary key,
name varchar(20) not null,
address varchar(255) not null,
phone int(11) not null,
account bigint(18) not null
);
########## End ##########
第2关:数据库表设计 - 项目职员表
#请在此添加实现代码
########## Begin ##########
#在warehouse_db库中创建project表
use warehouse_db;
create table project(
projectId int(11) primary key,
projectBudget double(10,0) not null,
commenceDate datetime not null
);
#在warehouse_db库中创建employee表
create table employee(
employeeId int(11) primary key,
name varchar(20) not null,
age int(3) not null,
designation varchar(20) not null,
warehouseId int(11) not null,
leaders varchar(20) not null,
constraint FK_employee_warehouseId foreign key(warehouseId) references warehouse(warehouseId)
);
########## End ##########
第3关:数据库表设计 - 关联表
#请在此添加实现代码
########## Begin ##########
#在warehouse_db库中创建supply表
use warehouse_db;
create table supply(
supplyId int(11) primary key,
projectId int(11) not null,
componentId int(11) not null,
supplyCount int(11) not null,
constraint FK_supply_supplyId foreign key(supplyId) references supplier(supplyId),
constraint FK_supply_projectId foreign key(projectId) references project(projectId),
constraint FK_supply_componentId foreign key(componentId) references component(componentId)
);
#在warehouse_db库中创建repertory表
create table repertory(
warehouseId int(11) primary key,
componentId int(11) not null,
repertoryCount int(11) not null,
constraint FK_repertory_warehouseId foreign key(warehouseId) references warehouse(warehouseId),
constraint FK_repertory_component_componentId foreign key(componentId) references component(componentId)
);
########## End ##########
版权声明
本文为[x 心 动]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_45623072/article/details/124149281
边栏推荐
猜你喜欢

Lottery applet, mother no longer have to worry about who does the dishes (assign tasks), so easy

2021-2022-2 ACM training team weekly Programming Competition (8) problem solution

ESP8266-入门第一篇
![[报告] Microsoft :Application of deep learning methods in speech enhancement](/img/29/2d2addd826359fdb0920e06ebedd29.png)
[报告] Microsoft :Application of deep learning methods in speech enhancement

Zero base to build profit taking away CPS platform official account

深度分析数据恢复原理——那些数据可以恢复那些不可以数据恢复软件

Openharmony open source developer growth plan, looking for new open source forces that change the world!

Use of fluent custom fonts and pictures

An algorithm problem was encountered during the interview_ Find the mirrored word pairs in the dictionary

Application of DCT transform
随机推荐
Summary of several relationships of UML class diagram
Machine learning catalog
SSDB foundation 2
Encyclopedia of professional terms and abbreviations in communication engineering
The flyer realizes page Jump through routing routes
Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es
The usage of slice and the difference between slice and array
Data analysis learning directory
MFC获取本机IP(网络通讯时用得多)
MySQL syntax collation (2)
HTTP cache - HTTP authoritative guide Chapter VII
TI DSP的 FFT与IFFT库函数的使用测试
音频编辑生成软件
MySQL lock
arcgis js api dojoConfig配置
IIS数据转换问题16bit转24bit
什么是消息队列
Class loading mechanism
JS to get the local IP address
2021-2022-2 ACM集训队每周程序设计竞赛(8)题解