Database review, database architecture and relational system

Source: Internet
Author: User

Database Review CH2 Database Architecture 2.1 Database Architecture hierarchy

A database architecture can be divided into 3 tiers:

    • External level
    • Conceptual hierarchy
    • Internal level

The external hierarchy refers to the interface that each user accesses the database in different high-level languages, the representation of the conceptual hierarchy database information, and the definition of the module (including security and integrity constraints, etc.), while the internal level is the storage representation (non-physical records are not machine-related), The design of the database requires that the three levels of independence be ensured:

    • The independence of physical data between the conceptual and inner layers
    • The independence of logical data between the outer layer and the conceptual layer
2.2 DBA and DBMS

The DBA (database administrator) must have a good understanding of the enterprise's data resources and enterprise requirements, in addition to the DBA's responsibilities:

    • Database schema Definition (database logical design)
    • Storage structure and Access methods
    • Physical organization and methods of modification
    • User Access Control
    • Integrity constraints
    • Monitoring database Performance
    • Maintain communication with users

DBAs have to do so much work with a DBMS (database management System), and we can look at two ways to see what a DBMS

The DBMS is first a software system that meets the following database requirements:

    • Data definition
    • Data modification
    • DML (Data manipulation language) request
    • Query optimization
    • Data security
    • Data integrity
    • Data concurrency
    • Data recovery
    • Performance

Second, the DBMS is still a file system.

2.3 Database Application Architecture

Database application has two typical structure, C/S architecture (client-server architecture), b/S Architecture (browser-server architecture), today's application is gradually from the C/s architecture to B/s architecture

In C/S architecture, the user either directly interacts with the DBMS through the database application to obtain the database service, or connects to the data server through the network, and the database server completes the interaction with the DBMS.

However, with the development of Web applications today, a new multi-level B/S Architecture database application is Born:

    • User interaction via Web browser and server
    • The Web server responds to user actions and transmits user requests to the application server
    • The Application Server completes the business logic of the system, translates the user request into a data request to the database server , and feeds the data request back to the Web server
    • The database server runs the DBMS and interacts directly with the database
CH3 Relationship System 3.1 relationship

We abstract the connection between entities in the real world into the form of tables (table), which is called relationship

(1) Table structure

The next table that records customer information is what we call a relationship:

Customer:

Name:name Street:street city:city
Jones North Harrison
Smith North Rye
Lindsay Park Pittsfield

We have a lot of terminology for relationships:

    • Domain Domain:domain refers to the data types of the attributes and the operations that the data types match, and the data properties can be either system-provided or user-defined
    • Attribute/Field attribute: attribute is the meaning of the unified real world represented by the column data of the table, name, Street, and city in the Customer table are the properties of the table
    • Tuple Tuple:tuple is a collection of rows of data in a table that represents a complete relational record, such as in the Customer table (Jones, North, Harrison) is a tuple
    • Cardinality cardinality: The number of tuples in a table
    • Degree Degree: The number of attributes in a table

C.j.date This book defines two operators that act on a type:

    • Selector: Allows a user to declare or select a value of this type
    • The_: Allows users to access the composition of these values

(not quite understood here)

(2) Relationship variables

The relationship is a table, the table header is an assertion (or a constant function), then each tuple in the table is a true proposition , c.j.date the table Head assertion is called the relationship , and the example of the relationship--these tuples of the set is called Relationship Variables (relvars)

Relationship variables are variable because the data in the table can change at any time, and there are two types of relationship variables:

    • Basic relationship variables: The set of tuples describes the actual basic relationship
    • View: is an abstract tuple representation based on a basic relationship (I have always interpreted the view as having many base tables, but not necessarily the complete base table, but rather the sub-relationships that a business logic requires [views], which can be the restrict and project of the base table, can also be a join of more than one base table)
(3) Catalogue/Dictionary

C.j.date describes a table of relational patterns in terms of a glossary (catalog) or dictionary (Dictionary), which is also referred to as descriptor information or meta data (metadata)

Popular understanding, the table of contents is the information that describes the relationship table name, column name row name, column number of rows, etc.

(4) Nature of the relationship

Relationships must meet the following properties:

    • There are no duplicate tuples in the relationship
    • Tuples are unordered in order
    • The attributes are also unordered
    • Each tuple has at most one value in the corresponding attribute (most relational databases can be allowed to be null)
(5) Operation

We abstract the operation of the relationship into the following three kinds (abstract, different from the specific operation in SQL):

    • Restrict: Extracting some rows from a table (tuples)
    • Project: Extracting some columns (properties) from a table
    • Join: Two Tables a column (property) has the same value, which merges the two tables together based on the values of those properties

There are two characteristics of the relationship operation:

    • All operations are for tables, and the output of all operations is a table
    • (Closure property) An operation's output (table) can be entered as another operation
3.2 Relational database

A relational database is a database that contains one or more relationships (tables), where tables are logical structures abstracted from business logic, business requirements, not physical storage structures (we do not care about the physical storage structure, which is the work of the DBMS)

Relational database is a simple multi-table structure, there is no pointer to each other reference

The relational database has a set of standardized design patterns to effectively avoid data redundancy and information loss, which will be described in later chapters

Relationship ModeDefinition: Has attributes A 1 , A 2 ,..., A n , then we call R( A 1 , A 2 ,..., A n ) ForRelationship Mode, a relational record/tuple in the relational schema R(R) Said

Database Review the database architecture and relational system

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.