Home Database Mysql Tutorial SQL Server 数据库设计

SQL Server 数据库设计

Jun 07, 2016 pm 05:45 PM
server database design

一、数据库设计的必要性 在实际的软件项目中,如果系统中需要存储的数据量比较大,需要设计的表比较多,表与表之间的关系比较复杂,那我们就需要进行规范的数据库设置。如果不经过数据库的设计,我们构建的数据库不合理、不恰当,那么数据库的维护、运行效率

一、数据库设计的必要性

         在实际的软件项目中,如果系统中需要存储的数据量比较大,需要设计的表比较多,表与表之间的关系比较复杂,那我们就需要进行规范的数据库设置。如果不经过数据库的设计,我们构建的数据库不合理、不恰当,那么数据库的维护、运行效率会有很大的问题。这将直接影响到项目的运行性和可靠性。

二、什么是数据库设计

      数据库设计实际上就是规划和结构化数据库中的数据对象以及这些数据对象之间的关系过程。

三、数据库设计的重要性

      Ø 不经过设计的数据库或是设计糟糕的数据库很可能导致

            1、 数据库运行效率地下

            2、 更新、删除、添加数据出现问题

      Ø 良好设计的数据库

             1、 执行效率高

             2、 使应用程序更便于开发

             3、 扩展性好

             4、 维护性好

四、数据模型

        数据模型就像是数据间联系的一个轮廓图,整个模型就像一个框架。

       如果按照记录间联系的表示方式,对数据模型进行分类,香港空间,可以分为:层次模型、网状模型、关系模型。前两种又称为格式化数据模型。数据模型的好坏直接影响到数据库的性能,所以数据模型的选择是数据库设计的首要任务。

       Ø 实体-关系(E-R)数据模型

              E-R数据模型(Entity-Relationship data model),即实体-关系数据模型。E-R数据模型不同于传统的关系数据模型,它不是面向实现,而是面向现实物体的。

       Ø 实体(Entity)

              数据是用来描述现实中的物体的,而描述的对象都是形形色色的,有具体的、也有抽象的;有物理上存在的、也有概念性的。凡是可以互相区别而且可以被人们认识的事、物、概念等统统抽象为实体。多个相同的类型的实体可以称为实体集(Entity set)。因此,在E-R数据模型中,也有型与值之分;实体可以作为型来定义,每个实体可以是它的实例和值。

       Ø 属性(Attribute)

              实体一般具体若干特征,这些特征称为实体的属性。而每个属性都有自己的取值范围,在E-R数据模型中称为值集(value set)。在同一实体集中,每个实体的属性及其值集都是相同的,但可能取不同的值。属性对应数据库表的列。

       Ø 关系(Relationship)

              实体之间会有各种关系,这些关系抽象为联系。不但实体可以有属性,网站空间,关系也可以有属性。

五、数据库设计步骤

       Ø 数据库设计可以分为以下几个阶段

              1、 需求分析阶段:分析客户的业务需求,特别是数据方面的需求

              2、 概要设计阶段:绘制数据库的E-R图,并确认需求文档的正确性和完整性,E-R图是项目的设计人员、开发人员、测试人员,以及和客户进行沟通的重要凭据

              3、 详细设计阶段:将概要设计阶段的E-R图转换为数据库表,进行逻辑设计,确定各个表之间的主外键关系,运用数据库的三范式进行审核,并进行技术评审。最后决定选哪种数据库(Oracle、SQLServer、MySQL)来建库、建表。

       Ø 需求分析阶段:数据库系统分析

              秀气分析阶段的重点是调查、收集、分析客户的业务数据需求以及数据的安全性、完整性需求等。

       需求分析步骤:

              1、 确认业务需求

              2、 标识关系实体

              3、 标识每个实体的具有的属性

              4、 确认实体之间的关系

       Ø 概要设计阶段:绘制E-R图

              作为数据库设计者,你需要和项目组内其他成员分享你的设计思路,共同研讨数据库设计的合理性、安全性、完整性,并确认是否符合客户的业务需求。那么使用E-R图,这种图形化的表示方式最为直观。

              * E-R图中的实体、属性和关系

                    

image

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Retro trend! HMD and Heineken jointly launch flip phone: transparent shell design Retro trend! HMD and Heineken jointly launch flip phone: transparent shell design Apr 17, 2024 pm 06:50 PM

According to news on April 17, HMD teamed up with the well-known beer brand Heineken and the creative company Bodega to launch a unique flip phone - The Boring Phone. This phone is not only full of innovation in design, but also returns to nature in terms of functionality, aiming to lead people back to real interpersonal interactions and enjoy the pure time of drinking with friends. Boring mobile phone adopts a unique transparent flip design, showing a simple yet elegant aesthetic. It is equipped with a 2.8-inch QVGA display inside and a 1.77-inch display outside, providing users with a basic visual interaction experience. In terms of photography, although it is only equipped with a 30-megapixel camera, it is enough to handle simple daily tasks.

ZTE 5G portable Wi-Fi U50S goes on sale for NT$899 at first launch: top speed 500Mbps ZTE 5G portable Wi-Fi U50S goes on sale for NT$899 at first launch: top speed 500Mbps Apr 26, 2024 pm 03:46 PM

According to news on April 26, ZTE’s 5G portable Wi-Fi U50S is now officially on sale, starting at 899 yuan. In terms of appearance design, ZTE U50S Portable Wi-Fi is simple and stylish, easy to hold and pack. Its size is 159/73/18mm and is easy to carry, allowing you to enjoy 5G high-speed network anytime and anywhere, achieving an unimpeded mobile office and entertainment experience. ZTE 5G portable Wi-Fi U50S supports the advanced Wi-Fi 6 protocol with a peak rate of up to 1800Mbps. It relies on the Snapdragon X55 high-performance 5G platform to provide users with an extremely fast network experience. Not only does it support the 5G dual-mode SA+NSA network environment and Sub-6GHz frequency band, the measured network speed can even reach an astonishing 500Mbps, which is easily satisfactory.

Honor Magic V3 debuts AI defocus eye protection technology: effectively alleviates the development of myopia Honor Magic V3 debuts AI defocus eye protection technology: effectively alleviates the development of myopia Jul 18, 2024 am 09:27 AM

According to news on July 12, the Honor Magic V3 series was officially released today, equipped with the new Honor Vision Soothing Oasis eye protection screen. While the screen itself has high specifications and high quality, it also pioneered the introduction of AI active eye protection technology. It is reported that the traditional way to alleviate myopia is "myopia glasses". The power of myopia glasses is evenly distributed to ensure that the central area of ​​​​sight is imaged on the retina, but the peripheral area is imaged behind the retina. The retina senses that the image is behind, promoting the eye axis direction. grow later, thereby deepening the degree. At present, one of the main ways to alleviate the development of myopia is the "defocus lens". The central area has a normal power, and the peripheral area is adjusted through optical design partitions, so that the image in the peripheral area falls in front of the retina.

How does Hibernate implement polymorphic mapping? How does Hibernate implement polymorphic mapping? Apr 17, 2024 pm 12:09 PM

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

New stacking process! Xiaomi MIX Fold 4 is equipped with Jinshajiang 'three-dimensional special-shaped' battery for the first time New stacking process! Xiaomi MIX Fold 4 is equipped with Jinshajiang 'three-dimensional special-shaped' battery for the first time Jul 20, 2024 am 03:20 AM

According to news on July 19, Xiaomi MIX Fold 4, the first flagship folding new phone, was officially released tonight and is equipped with a "three-dimensional special-shaped battery" for the first time. According to reports, Xiaomi MIX Fold4 has achieved a major breakthrough in battery technology and designed an innovative "three-dimensional special-shaped battery" specifically for folding screens. Traditional folding screen devices mostly use conventional square batteries, which have low space utilization efficiency. In order to solve this problem, Xiaomi did not use the common winding battery cells, but developed a new lamination process to create a new form of battery, which greatly improved the space utilization. Battery Technology Innovation In order to accurately alternately stack positive and negative electrode sheets and ensure the safe embedding of lithium ions, Xiaomi has developed a new ultrasonic welding machine and lamination machine to improve welding and cutting accuracy.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Honor X60i mobile phone is on sale starting from 1,399 yuan: visual quadrilateral OLED direct screen Honor X60i mobile phone is on sale starting from 1,399 yuan: visual quadrilateral OLED direct screen Jul 29, 2024 pm 08:25 PM

According to news on July 29, the Honor X60i mobile phone is officially on sale today, starting at 1,399 yuan. In terms of design, the Honor X60i mobile phone adopts a straight screen design with a hole in the center and almost unbounded ultra-narrow borders on all four sides, which greatly broadens the field of view. Honor X60i parameters Display: 6.7-inch high-definition display Battery: 5000mAh large-capacity battery Processor: Dimensity 6080 processor (TSMC 6nm, 2x2.4G A76+6×2G A55) System: MagicOS8.0 system Other features: 5G signal enhancement, smart capsule, under-screen fingerprint, dual MIC, noise reduction, knowledge Q&A, photography capabilities: rear dual camera system: 50 million pixels main camera, 2 million pixels auxiliary lens, front selfie lens: 8 million pixels, price: 8GB

The 2024 Apple iPad Pro/Air does not support the second-generation Apple Pencil: you can buy a new one if you need it The 2024 Apple iPad Pro/Air does not support the second-generation Apple Pencil: you can buy a new one if you need it May 08, 2024 pm 04:07 PM

According to news on May 8, Apple’s new iPad Pro/Air tablets have been released. According to Apple’s official website, the new iPad Pro and iPad Air no longer support the second-generation Apple Pencil released in 2018, but only support Apple Pencil Pro and Apple Pencil (USB- C). Apple Pencil (USB-C) will be released in November 2023. This stylus maintains the same pixel-level accuracy, low latency, and tilt-angle sensing features as the first and second-generation Apple Pencil, while eliminating pressure sensitivity. function and does not support wireless charging. Its price is 649 yuan. And the newly released ApplePe

See all articles