当前位置:网站首页>MySQL——规范数据库设计
MySQL——规范数据库设计
2022-07-03 21:02:00 【Java学不会】
1、为什么需要设计数据库
- 当数据库比较复杂的时候,我们就需要设计
- 糟糕的数据库设计:
- 数据冗余,浪费空间
- 数据库插入和删除都会麻烦(屏蔽使用物理外键)
- 程序的性能差
- 良好的数据库设计:
- 节省空间
- 保证数据库的完成性
- 方便开发系统
- 数据库的设计:
- 分析需求: 分析业务和需求处理的时刻的需求
- 概要设计: 设计关系图E-R图
2、三大范式
为什么需要数据规范化
- 信息重复
- 更新异常
- 插入异常:无法正常显示信息
- 删除异常:丢失有效的信息
2.1、第一范式(1NF)
- 原子性: 保证一列不可再分
2.2、第二范式(2NF)
- 前提: 满足第一范式
- 每张表只描述一件事情
2.3、第三范式(3NF)
- 前提: 满足第一范式和第二范式
- 第三范式需要确保数据表中的没一列数据都和主键直接相关,而不能间接相关。
3、规范性和性能的问题
- 关联查询的表不得超过三张表
- 考虑商业化的需求和目标: 数据库的性能更加重要
- 在规范性能的问题的时候,需要适当的考虑一下
规范性性 - 故意给某些表增加一些冗余的字段。(从多表查询中变为单表查询)
- 故意增加一些计算列(从大数据量降低为小数据的查询,索引)
边栏推荐
- Introduction to golang garbage collection
- Reinforcement learning - learning notes 1 | basic concepts
- QT6 QML book/qt quick 3d/ Basics
- Qt6 QML Book/Qt Quick 3D/基础知识
- (5) Web security | penetration testing | network security operating system database third-party security, with basic use of nmap and masscan
- APEC industry +: father of the king of the ox mill, industrial Internet "king of the ox mill anti-wear faction" Valentine's Day greetings | Asia Pacific Economic media | ChinaBrand
- Strange way of expressing integers (expanding Chinese remainder theorem)
- Link aggregation based on team mechanism
- Mysql database ----- common commands of database (based on database)
- Basic number theory -- Chinese remainder theorem
猜你喜欢

9 pyqt5 qscrollarea scroll area and qscrollbar scroll bar

Install and use Chrony, and then build your own time server

Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of rotary tablet presses in the global market in 2022

How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code

《ActBERT》百度&悉尼科技大学提出ActBERT,学习全局局部视频文本表示,在五个视频-文本任务中有效!...

Scientific research document management Zotero

Nmap and masscan have their own advantages and disadvantages. The basic commands are often mixed to increase output

强基计划 数学相关书籍 推荐

Talk about daily newspaper design - how to write a daily newspaper and what is the use of a daily newspaper?

Basic preprocessing and data enhancement of image data
随机推荐
2022 safety officer-c certificate examination and safety officer-c certificate registration examination
[Tang Laoshi] C -- encapsulation: member variables and access modifiers
The 12th Blue Bridge Cup
MySQL master-slave synchronization principle
Discussion Net legacy application transformation
TLS environment construction and plaintext analysis
Battle drag method 1: moderately optimistic, build self-confidence (1)
Haven't expressed the artifact yet? Valentine's Day is coming. Please send her a special gift~
Interval product of zhinai sauce (prefix product + inverse element)
Basic knowledge of dictionaries and collections
Gee calculated area
Talk about daily newspaper design - how to write a daily newspaper and what is the use of a daily newspaper?
Software testing skills, JMeter stress testing tutorial, obtaining post request data in x-www-form-urlencoded format (24)
MySQL 8.0 data backup and recovery
[gd32l233c-start] 5. FLASH read / write - use internal flash to store data
Go learning notes (4) basic types and statements (3)
[secretly kill little buddy pytorch20 days -day02- example of image data modeling process]
@Transactional注解失效的场景
leetcode-540. A single element in an ordered array
Instructions for common methods of regular expressions