SQL Server database design

Source: Internet
Author: User
I. Necessity of Database Design in actual software projects, if the amount of data to be stored in the system is large, many tables need to be designed, and the relationship between tables is complex, then we need to set up a standard database. Without the database design, the database we build is unreasonable and inappropriate, so the database maintenance and operation efficiency

I. Necessity of Database Design in actual software projects, if the amount of data to be stored in the system is large, many tables need to be designed, and the relationship between tables is complex, then we need to set up a standard database. Without the database design, the database we build is unreasonable and inappropriate, so the database maintenance and operation efficiency

I. Necessity of Database Design

In actual software projects, if the amount of data to be stored in the system is large, many tables need to be designed, and the relationship between tables is complex, then we need to set up a standard database. Without the database design, the database we build is unreasonable and inappropriate, so the database maintenance and operation efficiency will be very high. This will directly affect the running and reliability of the project.

2. What is database design?

Database Design is actually the process of planning data objects in a structured database and the relationship between these data objects.

Iii. Importance of Database Design

A database that has not been designed or a poorly designed database may cause

1. database operation efficiency underground

2. An error occurred while updating, deleting, and adding data.

Good Database Design

1. High execution efficiency

2. Make the application easier to develop

3. good scalability

4. good maintainability

Iv. Data Model

The data model is like an outline of the relationship between data. The whole model is like a framework.

If data models are classified based on the relationship between records, the Hong Kong space can be divided into hierarchical models, mesh models, and relational models. The first two types are also known as formatted data models. The quality of the data model directly affects the performance of the database. Therefore, the selection of the data model is the primary task of the database design.

Entity-relationship (E-R) Data Model

Entity-Relationship data model, an Entity-relational data model. The E-R data model is different from the traditional relational data model. It is not oriented to implementation, but to realistic objects.

Entity)

Data is used to describe objects in reality, and the objects to be described are all kinds of specific and abstract objects. There are physical and conceptual objects. All things, things, and concepts that can be differentiated from each other can be abstracted as entities. Multiple entities of the same type can be called Entity sets ). Therefore, in the E-R data model, there are also types and values; entities can be defined as types, each entity can be its instance and value.

Ø Attribute)

Objects are generally specific features. These features are called attributes of objects. Each attribute has its own value range, which is called value set in the E-R data model ). In the same object set, the attributes and Value Sets of each object are the same, but different values may be taken. Attribute corresponds to the columns in the database table.

Ø Relationship)

There are various relationships between entities. These relationships are abstracted as links. Not only can entities have attributes, but also website spaces and links.

5. Database Design Steps

The database design can be divided into the following stages:

1. Demand analysis stage: analyze the customer's business needs, especially the data needs

2. Outline Design Phase: drawing the E-R diagram of the database, and confirming the correctness and integrity of the requirement document, the E-R diagram is the project design personnel, developers, testers, important creden for communication with customers

3. Detailed design stage: The E-R diagram of the outline design stage is converted into a database table, the logic design is carried out, the relationship between the primary and Foreign keys is determined, and the three paradigm of the database is used for review, and conduct technical review. Finally, you can choose which database (Oracle, SQLServer, MySQL) to create databases and tables.

Ø requirement analysis stage: Database System Analysis

The focus of the show analysis stage is to investigate, collect, and analyze the customer's business data requirements, as well as the data security and integrity requirements.

Requirement Analysis steps:

1. Confirm Business Requirements

2. Mark a link object

3. Identify the attributes of each object

4. confirm the relationship between entities

Brief design stage: Drawing E-R Diagram

As a Database Designer, you need to share your design ideas with other members in the project team, discuss the rationality, security, and integrity of the database design, and confirm whether it meets the customer's business needs. So the use of E-R, This graphical representation of the most intuitive.

* Entities, attributes, and relationships in a E-R Diagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.