Introduction to Database Systems - Basic concepts

First, the data model

Data model is an abstraction of the real world data characteristics (simply is simulated real world), is the core and foundation of database systems

1.1 two types of data model

Two different levels of data models

Conceptual model
also called information model, according to the user's point of view of data and information modeling, database design for
the logical and physical model
1, the logical model: a computer system according to the viewpoint of data modeling, for DBMS implementation ( including network shape model, hierarchical model, the relational model, object-oriented data model, object-relational data model, semi-structured data model, etc. )
2, physical model: the bottom of abstract data, and the representation description data access method in the system of or storage and access method on a disk or tape

Second, the data structure of the library system

2.1 The concept of a database system mode

The concept of "type" and "value"

  • Type: description of the structure and properties of a class of data
  • A specific type of assignment: value

For example, a record value of student records (student number, name, sex, department, age, place of origin) of (201 315 130, Li Ming, male, Department of Computer Science, 19, Nanjing, Jiangsu Province)
mode

  • Description of structure and characteristics of the logical database
  • Type is described, does not relate to a specific value
  • It reflects the structure and contact data
  • Mode is relatively stable

Examples

  • A particular pattern of values
  • Reflect the state of the database at a time
  • The same pattern can be many instances
  • Examples with the update data in the database and change

Three mode configuration database system 2.2

miWSqH.png

2.2.1 Mode

Also known as logical schema

  • Description of the logical structure and features of all the data in the database
  • All the user's public data view

A database is only a pattern
position pattern: pattern database system is an intermediate layer structure
defined pattern

  • The logical structure data (name data item, the type, range, etc.)
  • Links between data
  • Relevant safety data integrity requirements

Database schema

  • Global logical structure of the database is the central and key
  • Database independent of the other levels
  • Design database schema should first determine the structure of the logical database model

2.2.2 external mode

Also known as sub-mode or user mode

  • Describe the logical structure of the database and the user can see the characteristics and use of local data
  • Database user view of the data, an application is a logical representation of data relating to

Standing outside pattern: between model and application
relationship model and external mode: one to many

  • External mode is usually a subset of the model
  • A database can have multiple external modes. It reflects the application requirements of different users, the way of looking at the data, the data privacy requirements
  • On the same data model, the outer mode structure, type, length, and so may be different levels of confidentiality

External relations and mode of application: one on one

  • The same pattern may be used outside for a plurality of user applications
  • An application can use an external mode

The use of external model

  • Guarantee of a strong database security measures
  • Each user can see the external data access mode and in the corresponding

Outside the database schema

  • For specific applications
  • Defined above logical schema
  • Independent of the storage mode and the storage device
  • When the application needs greater change occurs, its corresponding outer view mode can not meet the requirements, the external mode corresponding changes have to do
  • External design pattern should fully take into account the expansion application

2.2.3 in the mode

Also called storage mode

  • Describes the data structures and the physical storage of
  • Data is represented in the internal database

Only a pattern within a database
within the database schema

  • Dependent on its global logic structure
  • Database-independent view of the user, i.e., the outer pattern
  • Independent of any specific storage device 
  • The global data structure and its associated logical structure defined organized according to a certain physical storage strategy to achieve better efficiency in time and space

2.3 two image database functions and data independence

Three modes are three levels of abstraction of the data
two map to achieve the three levels of abstraction within the database management systems for communication and conversion

2.3.1 external mode / image mode

Same pattern can have any number of outer patterns
each external mode, the external database system has a pattern / mode image, a correspondence between the mode and the external mode defined
mappings defined in the description of each generally comprise an outer mode
to ensure logical data independence

  • When the mode is changed, the external database administrator mode / mode image to be changed accordingly, so that the outer mode remains unchanged
  • The application is based on data prepared by the external mode, without having to modify the application to ensure the independence of the data and logic program, referred to as the logical data independence

2.3.2 mode / the mode map

Mode / image mode defines the correspondence relationship between the logical structure and the global data structure stored
in the database model / image mode is only the
image definition generally comprise in the description mode
guarantee the physical data independence

  • When the storage structure of the database changes (e.g., another storage structure selected), the database administrator edit mode / image mode within the pattern remains unchanged
  • Applications are not affected. Ensure the independence of physical data and procedures, referred to as physical data independence

Guess you like

Origin www.cnblogs.com/xxwang1018/p/11546721.html