SQL 1 for interview preparation -- Database Design

Source: Internet
Author: User

1. Steps for designing a database:

(1). Demand analysis stage

(2). Outline Design Stage: Drawing E-R model Diagram

(3). Detailed design stage: E-R model diagram to database table

(4 ).CodeWriting Stage

(5). Test phase

(6). Deployment and Installation

 

2. outline design phase:

(1). Collect information

(2). Identify the object

(3) Identify the details to be stored for each object

(4). Identify the relationship between objects

For example, the first step is to read the requirement analysis document, the second step is to find out the object. The third step is to set the corresponding object class attributes. The last step is to set the relationships between entities (such as the relationship between the primary and Foreign keys or one-to-many, one-to-many, and many-to-many)

 

3. Drawing E-R Diagram

(1). Entity

(2). Attributes

(3). Relationship

(4). ing Base

(5). Object relationship diagram

  • Rectangle indicates entity set
  • Elliptic representation of attributes
  • Diamond represents a link set
  • A straight line is used to connect an attribute and an object set. It is also used to link an object set. A straight line can have a direction (arrow) to indicate the ing base of a link set: 1: 1, 1: n, m: N.

4. Three major paradigms

First paradigm: Ensure the atomicity of each column;

Second paradigm: On the basis of the first paradigm, is there a partially dependent relationship (for composite primary keys) to describe only one thing;

Third paradigm: On the basis of the second paradigm, there is no transfer dependency relationship.

 

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.