Designing Database Steps

Source: Internet
Author: User

Design Database

    • in the requirements analysis phase, the general steps for designing the database are:

– Collect information

– Identify objects

– Identify the properties of each object

– Identify the relationships between objects

    • in the profile design phase and detailed design phase, the steps for designing the database are:

– Draw E-r Diagram

– Convert the E-r diagram to a table

– Application of the three canonical normalization forms

Below we take a BBS simple forum database design as an example to see the steps to design the database:

    • Collect information:

Communicate and sit down with the relevant personnel of the system to fully understand the tasks that the database needs to accomplish

Basic functions of BBS forum:

L User Registration and login, background database needs to store the user's registration information and online status information;

L user posts, background database needs to store posts related information, such as the content of posts, titles, etc.;

L Forum Management: Background database needs to store various sections of information, such as moderators, section names, posts, etc.

    • Identity object (Entity-entity)

Identify the key objects or entities to be managed by the database

Entities are generally nouns:

L Users: forum for ordinary users, the moderator of each section.

L user-issued main stickers

L user-issued keep abreast (Huitie)

L section: Information on various sections of the forum

    • Identify the attributes of each entity (Attribute)

    • Identify relationships between objects (relationship)

L Keep abreast and main post have a master-slave relationship: We need to show in the keep abreast object who it is keep abreast;

L section and the user has a relationship: from the user object can be identified according to the object of the corresponding moderator user situation;

L main posts and sections have a master-slave relationship: Need to indicate which section of the post belongs to;

L Keep abreast and section have a master-slave relationship: need to indicate which keep abreast belong to which section;

    • Draw a e-r diagram

    • Convert a e-r chart into a table
      • • Convert each entity to a corresponding table, converting each property to a column corresponding to each table
      • • Identify the primary key columns for each table, note that the table with no primary key adds the ID number column, which has no actual meaning for the master key or foreign key, such as the "UID" column in the user table, the "SID" column in the section table, the "TID" column in the posting table and the Keep abreast table
      • • Establish a primary foreign key between tables, reflecting the mapping between entities

Here we draw ER diagram can use Microsoft Word or Visio and Sybase Company's PowerDesigner, it is mainly used to communicate with customers and exchange views, and repeatedly modified until the customer confirmed. After the customer confirms, the E-r diagram is converted to a table. We have done the work above. Then the final step: Apply the three paradigms to the design of multiple tables to audit and standardize the structure of the table .

Designing Database Steps

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.