(1) Introduction

Source: Internet
Author: User
I. DataBase System Overview D (Data) DataBase (DataBase) DataBase DBMS (DataBaseManagementSystem) DataBase Management System DBS (DataBaseSysem) DataBase System II. DataBase Development 1. manual management phase 2. file System Phase 3. database System Stage 3. Features of the database system 1. data structuring 2. data sharing

I. DataBase System Overview D (Data) DataBase DBMS (DataBase Management System) DataBase Management System DBS (DataBase Sysem) DataBase System II. DataBase Development 1. manual management phase 2. file System Phase 3. database System Stage 3. Features of the database system 1. data structuring 2. data sharing

I. Database System Overview

D (Data) Data

DataBase

DBMS (DataBase Management System) DataBase Management System

DBS (DataBase Sysem) DataBase System

2. Database Development

1. manual management stage

2. File System Phase

3. Database System stage

Iii. Database System features

1. Data structuring

2. High data sharing, low redundancy, and easy expansion

3. High Data independence

Physical independence: Your applications and data stored in the database on the disk are independent of each other.

Logical independence: the overall logical structure of your applications and databases is independent.

4. Data is centrally managed and controlled by DBMS

Iv. Data Model

  

Elements:

1. Data Structure (hierarchical, mesh, relational, and object-oriented)

2. Data Operations (query, insert, delete, modify, and so on)

3. Data integrity constraints

V. Conceptual Model

A conceptual model is a description of things in the real world, not the software design. The concept description includes: Mark, connotation, and extension. The mark and connotation (View) are of the most practical significance.

Basic concepts in the information world:

1. entity-objective existence of things that can be recognized by each other

2. Attribute -- a feature of an object

3. Code -- attribute set that uniquely identifies an object

4. The value range of the domain-attribute. It is a data set with the same data type.

5. Real Shape: entities with the same attributes must have the same features and attributes.

Example: Instructor (Instructor ID, name, age, title)

6. entity set-set of the same entity

7. Connections-associations between internal and inter-things

Contact Type:

1. One-to-one

2. one-to-many

3. many-to-many

6. Representation of the conceptual model (E-R diagram)

The E-R method is short for Entity-Relationship Approach. It is an effective method to describe the conceptual structure model of the real world. Is a way to represent a conceptual model, using a rectangle to represent a real shape, moment

The contact type (, 1: n or m: n) on the undirected edge ).

Elements

Entity: entities with the same attributes have the same characteristics and properties, and abstract and portray similar entities with Entity Names and attribute names; In the E-R diagram, they are represented by rectangles, specify the entity name in the rectangle frame. For example, the student Zhang Sanfeng,

Student Li xunhuan is an entity. If the object is a weak object, the solid rectangle is placed outside the rectangle.

Attribute: a feature of an object. An object can be characterized by multiple attributes. In the E-R diagram, it is represented by an elliptical shape and connected with the corresponding entity with an undirected edge; for example, the student's name, student ID, gender,

All are attributes. If it is a multi-value attribute, then the real-line elliptic is placed outside the elliptical shape. If it is a derived property, it is represented by a dotted-line elliptic.

Relationship: This is also known as a link. in the information world, the link between entities or entities is reflected. The internal links of an object usually refer to the links between attributes of an object. The links between entities usually refer to different entities.

Set. In the E-R diagram, the contact name is indicated in the diamond box, the Hong Kong server, and connected with the relevant entities with undirected edges, respectively, the contact type (1: 1, 1: n or m: n) on the undirected edge ). For example, the instructor gives students

There is a relationship between teaching and course selection. If it is the relationship between weak entities, then the diamond is placed outside the diamond. [2]

There are three types of contact:

(1) One-to-one relationship)

For example, if a department has one manager and each manager only works for one department, the Department and the manager are one-to-one.

(2) One-to-multiple connections)

For example, there is a one-to-many relationship between a school teacher and the course, that is, each teacher can teach multiple courses, but each course can only be taught by one teacher.

(3) Multi-to-Multi-contact (m:n)

For example, the relationship between students and courses ("Learning") is many-to-many, that is, one student can learn multiple courses, and each course can have multiple students to learn. The contact may also have attributes. For example, the achievement of a student "Learning" A Course

Performance is neither a student's attribute nor a course's attribute. Because "score" depends on a specific student and a specific course, it is the attribute of "Learning" between the student and the course.

Drawing steps:

(1) determine all entity sets

(2) Select the attributes that the object set should contain.

(3) determine the relationship between entity sets

(4) determine the keywords of the object set, and use underscores to indicate the Attribute combination of the keywords (I .e., determining the PK)

⑸ Determines the contact type. When the diamond box Indicating the contact is connected to the entity set with a line, it indicates 1 or n (multiple) beside the line to indicate the contact type.

VII. Relational Model

A link is actually the state or content of the link mode at a certain time point. That is to say, the link mode is a type, and the link is its value. The Relationship Mode is static and stable, while the relationship is dynamic and constantly changing over time, because the relationship operation

Constantly update the data in the database. However, in practice, the relationship model and relationship are often collectively referred to as the relationship. Readers can distinguish between them from the context.

Definition

Relational Model: represents the data model of the association between entities in the form of a two-dimensional table.

Link Mode

The relational model can be formally represented as R (U, D, Hong Kong server lease, dom, F)

R -- Link name

U -- a set of attribute names that constitute the link

D -- the domain from which the attribute belongs in the property group U

Dom-set of attributes to the domain

F -- a set of data dependencies between attributes.

1. Data Structure of the relational model:

The logical structure of data in a relational model is a two-dimensional table, which consists of rows and columns. Each row becomes a tuples, and none of the columns become an attribute (field ).

Link: A link corresponds to a two-dimensional table.

Tuples: one row

Attribute: one column

Primary code: a set of attributes that uniquely identify a single tuples.

Field: attribute value range

Component: an attribute value in a tuples.

Link mode: it is a set of link names and attributes. It is generally expressed as a link name (attribute 1, attribute 2 ,...... Attribute N)

2. Constraints on data operations and integrity of the relational model

Constraints are used to ensure data accuracy and consistency. Data integrity is a guarantee of data accuracy and consistency.

    

Data Integrity is the precision and Reliability of Data ).

    

There are four types:

1) entity Integrity: each row of the table is a unique entity in the table.

2) domain Integrity: indicates that the columns in a table must meet certain data type constraints, including the value range and precision.

3) integrity of reference: The data of the primary and external Keywords of the two tables should be consistent, ensuring data consistency between the tables, prevents data loss or meaningless data from spreading in the database.

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.