Introduction to Databases

Source: Internet
Author: User
Tags access database

Have a certain understanding of this aspect of knowledge, but there is some confusion, the first known database is the Access relational database, which is the most commonly used in Microsoft Office to save the data of the database, in the NCRE exam has been contacted, learned the C + + language and C # The language knows that SQL Server based on the C # language is the most powerful and comprehensive relational database.

Database

A database (DB) is a collection of data that is stored in an organized manner. When people collect a large amount of data, they should be preserved for further processing and to extract useful information further. Now people are using computer and database technology to scientifically save a lot of data to make better use of these data resources.

Database system

Database System (DBS) is a system composed of database and its management software, and the software system and hardware related to database are often referred to as database system. Database system is a computer systems using database technology, is composed of database (data), database management system (software), database Administrator (personnel), hardware platform (hardware) and software platform (software) 5 part of the running entity. Database administrator is a database planning, design, maintenance and monitoring of professional managers, in the database system plays a very important role.

Database Architecture

Database has a rigorous architecture, which can effectively organize, manage data, improve the logical independence and physical independence of the database. The standard structure recognized in the database domain is the three-level schema structure.

The database three-level pattern structure refers to the pattern, the outer mode and the inner mode.

Pattern: A pattern is also called a logical or conceptual pattern, which is a description of the logical structure and characteristics of all the data in a database, and is a common view of the data for all users. A database has only one schema, and the schema is in the middle tier of the three-level structure. Defining a schema not only defines the logical structure of the data, but also defines the connection between the data and defines the security and integrity requirements associated with the data.

External mode: External mode is also known as user mode, which is a description of the logical structure and characteristics of the local data that the database user (including the application and end users) can see, is the Data view of the database user, and is the logical representation of the data related to an application. Outer mode is a subset of patterns. A database can have multiple external schemas. External mode is a powerful measure to ensure data security.

Internal mode: Internal mode is also called storage mode, a database has only one internal mode. It is a description of the physical structure and storage of the data, and is how the data is represented inside the database.

Mapping between level three modes

The database management system provides a two-layer mapping between three-level schemas in order to be able to internally implement the 3 levels of abstraction and transformation of the database.

External mode/Pattern mapping: There can be any number of external modes for the same pattern, and for each external mode, the database system has an external mode/schema mapping. When the schema changes, the database administrator changes the external mode/schema mappings accordingly, allowing the external mode to remain unchanged. In this way, applications written according to the data schema are not modified to ensure the logical independence of the data and the program.

mode/Internal mode mapping: The database has only one mode and internal mode, so the schema/inner mode mapping is unique, it defines the correspondence between the global logical structure of the database and the storage structure. When the storage structure of the database changes, the database administrator changes the schema/internal schema mappings Accordingly, so that the pattern remains unchanged and the application does not change accordingly. In this way, the physical independence of the data and the program is ensured.

Data Model

The data model is a form of abstraction of objective things. It abstracts the objective things and deals with the concrete things of the real world through the computer. It objectively reflects the real world, is easy to understand and is consistent with people's understanding of the description of external things.

Data model is the core and foundation of database system, it is the combination of conceptual tools that describe the connection between data and data, the semantics of data and the constraint of data consistency. The data model usually consists of 3 parts, data structure, operation and integrity constraints.

Data structure: is a description of the static characteristics of the system, describing the object including the type of data, content, nature and the relationship between the data.

Data manipulation: is a description of the dynamic characteristics of the system, is the operation of various object instances in the database.

Integrity constraint: is a collection of integrity rules. It defines the constraints and dependencies of the data in a given data model and its associated rules.

a common data model

Hierarchical model: The data model of representing entity type and entity relation with tree structure is called hierarchical model, it has the characteristic that each tree has only one parent node, which is called root; all nodes except root in the tree have only one parent.

Mesh Model: A data model that represents entity types and relationships between entities using a forward graph structure is called a mesh model. Writing applications with a mesh model is extremely complex and data independence is poor.

Relational model: Describes data in two-dimensional tables. In the relational model, each table has multiple field columns and record rows, and each field column has a fixed attribute (number, character, date, and so on). Relational model data structure is simple, clear, with high data independence, so is the current mainstream database data model.

basic terminology for relational models

Relationship: A two-dimensional table is a relationship.

Tuple: is a row in a two-dimensional table, which is a record in a table.

Property: is a column in a two-dimensional table, expressed as a type and a value.

Domain: The range of values for each property.

Data constraints for relational data models:

Entity integrity constraint: The primary key attribute value of a constraint relationship cannot be a null value.

Referential integrity constraints: the basic constraints between relationships.

User-defined integrity constraints: it reflects the semantic requirements of the data in a particular application.

Normalization of relational databases

The normalization theory of relational database holds that every relationship in a relational database must meet certain specifications. Depending on the conditions that satisfy the specification: it can be divided into 5 levels: the first paradigm (1NF), the second paradigm (2NF) ... Model Five (5NF). Where NF is the abbreviation of the normal form. In general, as long as the data specification to the third normal form standard can meet the requirements.

First paradigm: In a relationship, the duplicate fields are eliminated, and each field is the smallest logical storage unit.

The second paradigm: if the relational model belongs to the first paradigm, then each non-primary key field in the relationship is completely dependent on the primary key field and cannot be partially dependent on part of the primary key field.

The third paradigm: if the relational model belongs to the first paradigm, and all non-primary key fields in the relationship are dependent on the primary key field only. The third paradigm requires removal of transitive dependencies.

principles of relational database design

1 The data organization of the database internal data file should obtain the maximum sharing, the minimum redundancy, eliminate the redundant part in the data and the data dependence, make the data that relies on the same data model to be separated effectively.

2 guaranteed input, data consistency and correctness when modifying data.

3 guarantee the high degree of independence between the data and the applications that use the data.

Entities and Relationships

Single-to-one relationship: refers to a record in table A that does have only one match in table B. Most of the relevant information is in a single table in a one-to-many relationship.

A one-to-many relationship: a row in Table A can have many matching rows in table B, but the rows in table B only have a matching row in table A.

Many-to-many relationships: refers to the rows of each table in the relationship that have multiple matching rows in the related table. In the database, the establishment of a many-to-many relationship depends on the 3rd table (called the Join table), which contains the primary key columns of the related two tables, and then creates a relationship to the matching columns in the join table from the primary key columns of the two related tables.

a common relational database

relational database, a database based on relational database model, is a database that processes data through concepts and methods such as set algebra.

Access database

Microsoft Accesss is one of the currently popular relational database management systems, at the heart of the Microsoft Jet database engine. Typically, when you install Microsoft Office, you select the default installation and the Access database is installed on your computer. Microsoft Accesss is a very easy-to-master database management system that allows you to create, modify, and maintain data in databases and databases, and you can use wizards to complete a series of operations on a database.

SQL Server 2008

The SQL Server database family has evolved to SQL Server 2008 through several upgrades, and is by far the most powerful and comprehensive version. I learned the database is this kind, in the back of the blog will do a detailed introduction, here do not do too much explanation.

Oracle Database

Oracle is a set of software products centered on a partial database. Oracle is currently the most widely used relational database in the world. It has complete data management functions, including the large amount of data, the persistence of data preservation, the sharing of data, the reliability of data. Oracle has better performance in parallel processing, real-time, and data processing speed. In general, a large enterprise chooses Oracle as a back-end database to handle massive amounts of data.

Introduction to Databases

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.