Some basic concepts about the database

The basic idea of ​​the database

A data
definition data: In computer science, data definitions is intended to mean all input symbols into the medium and a computer program a computer process, collectively, for inputting a digital computer for processing, having a certain significance, letters, known analog symbols and the like.

Type of data: different types of numbers, text, graphics, audio, video, etc. are stored in different ways.

Two database (DB)
definition of a database: The database is long-term storage in a computer, an organized collection of large amounts of data can be shared.

Database functions: organize, store and manage data.

Three database management system (DBMS)
define a database management system: a database manipulation and management of large-scale software used to create, use and maintenance of the database.

Functional database management system: manipulate and manage the database.

Common database management systems: SQL, Sybase, DB2.

Four database systems (DBS)
defined database system: The system usually consists of software, databases and data administrators composition.

Several basic concepts of information

An entity
exists objectively and can be distinguished from each other things called entity.

Entity type two
entities with the same attributes have the same characteristics and properties, an entity name and a property name and characterize the same set of abstract entity called solid type.

Three entity sets
set isotype entity called entity set,

Four links between entities
generally refers to a set of links between the different entities of the entity type, the link between the entities one, one-to-many and many other types.

The basic concept of the relational model

A relationship between
a corresponding relationship often said that a table.

Two attributes
an attribute that is a table.

Three field
range of properties.

Quad
row in the table that is a tuple.

Five yards
table an attribute group, it can only identify a tuple.

Six components of
an attribute value tuple.

Seven relational model
description of the relationship, the relationship is generally expressed as a name (attribute 1, property 2, ..., attributes n)

Three mode structure of the database

Three model structure and advantages of the
people database for the design of a strict architecture, art-recognized standard database structure is a three mode configuration, comprising an outer pattern, the conceptual model, the model, to effectively organize, manage data, improving the database logical and physical independence of independence. Corresponding to the user-level external mode corresponding to the conceptual schema conceptual level, the physical level mode corresponding to the different levels of users different views of the database is formed. The so-called view, refers to the observation, awareness and understanding of the scope of data, methods and angles, is reflected in the user database "eyes", it is clear, at different levels (level) the user "see" the database is not the same.

Mode
definitions: also called a logical mode or a conceptual model, all the data describing the logical structure of the database and features, is common view of all users.
Appreciated: ① a database is only a conceptual model;
② database view in the logic stage;
③ a certain kind of data in the database schema based model

The mode
understood: ① a database only within a pattern;
② a table may consist of multiple files, such as: data files, index files.
It is a method for a database management system (DBMS) data in the database to effectively organize and manage an object are: ① In order to reduce data redundancy, data sharing;
② In order to improve access efficiency, improve performance.

The outer pattern
defined: the local data is described logical structure and characteristics of the user database (including application programmers and end users) can see and use, the user view of the data is the database, is associated with the logical data indicates an application.
Understand: ① a database can have multiple foreign mode;
② The model is the user view;
③ external mode is to ensure data security of a strong measures.

Data definition language
definition: SQL language is the language responsible for centralized data structure definitions and database objects defined by CREATE, ALTER and DROP syntax composed of three, was first started by Codasyl (Conference on Data Systems Languages) data model, it is now included SQL commands as a subset. Most DBMS support DDL operations on database objects, part of the database (eg PostgreSQL) can be placed in the DDL transaction instruction, that is, it can be withdrawn (Rollback). Newer versions of the DBMS will join the DDL trigger special program that allows database administrators to track changes from the DDL. .

Data manipulation language
definitions: a data manipulation language DML (Data Manipulation Language), can achieve the basic operation of the database through which the user.

Physical independence of the data and programs of
physical independence refers to the user data in the database application program stored on the disk are independent. That is, how the data is stored on the disk by the need to know the DBMS, the user program, the application to process only data of the logical structure, physical storage so that when the data changed, without changing the application.

Logical data independence and program
logic refers to a logical structure of the user independent of the application and the database are independent of each other, i.e., when the logical structure of the data changes, the user may change the program.

Why Database independence of data and programs
because of the database, the application access to the data is to be carried out by the DBMS, you can not directly manipulate the data itself. And DBMS mechanism provides two images: an outer mode / image mode and a mode / the mode map. This mechanism ensures that the image layers logic independence and physical independence of data in the system database.
Here Insert Picture Description

Released two original articles · won praise 2 · Views 1279

Guess you like

Origin blog.csdn.net/lrx359641708/article/details/104579564