当前位置:网站首页>仓库管理数据库系统设计
仓库管理数据库系统设计
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
边栏推荐
- ESP8266-入门第一篇
- 命令-sudo
- Grafana 分享带可变参数的链接
- The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
- DevOps集成-Jenkins 服务的环境变量和构建工具 Tools
- Redis core technology and practice 1 - start with building a simple key value database simplekv
- MySQL syntax collation (3)
- An example of using JNI to directly access surface data
- 高效的串口循环Buffer接收处理思路及代码2
- Speculation on the way to realize the smooth drag preview of video editing software
猜你喜欢
![[报告] Microsoft :Application of deep learning methods in speech enhancement](/img/c1/7bffbcecababf8dabf86bd34ab1809.png)
[报告] Microsoft :Application of deep learning methods in speech enhancement

Redis optimization series (III) solve common problems after master-slave configuration

5 minutes to achieve wechat cloud applet payment function (including source code)

Virtual machine performance monitoring and fault handling tools

山大网安靶场实验平台项目—个人记录(四)

arcMap 发布切片服务

Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es

C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间

Network protocol: SCTP flow control transmission protocol

Application of DCT transform
随机推荐
[报告] Microsoft :Application of deep learning methods in speech enhancement
Application of DCT transform
Reflection on the performance of some OpenGL operations in the past
Pit encountered using camera x_ When onpause, the camera is not released, resulting in a black screen when it comes back
MySQL syntax collation
命令-sudo
机器学习目录
Hot reload debugging
openlayers draw矩形
openlayers 5.0 两种居中方式
JS to get the local IP address
SSDB Foundation
[report] Microsoft: application of deep learning methods in speech enhancement
js获取本机ip地址
Executor、ExecutorService、Executors、ThreadPoolExecutor、Future、Runnable、Callable
对普通bean进行Autowired字段注入
Wechat applet part of the mobile phone Preview PDF did not respond
[报告] Microsoft :Application of deep learning methods in speech enhancement
Prefer composition to inheritance
JS calculation time difference