"Oracle" Introductory Learning (i)

Source: Internet
Author: User

Always wanted to learn Oracle but didn't make up your mind. This time borrowed a book, must learn Oracle.

Currently learning Oracle 11g from getting started to mastering Oracle Technology

The basic theory of relational database

Data Model : Hierarchical model, mesh model, relational model (most popular)

Relationship : A two-dimensional table consisting of rows and columns intersected by a tuple representing an entity; a property

the nature of the relationship :

① attribute values are not decomposed

② There are no duplicate tuples, that is, rows with no duplicates

③ theoretically there is no line order, and sometimes it can be ordered.

④: A property or property set that uniquely identifies a tuple in a relationship

⑤ candidate Key: A set of attributes that uniquely identifies a tuple and does not contain more than one attribute

⑥ PRIMARY Key: If there are multiple candidate keys, select one of the main keys

⑦ FOREIGN key: The primary key t of relationship A is placed in relationship B, then T is the foreign key of B

e-r model : A logical model of a relational database, represented by a graphical representation of entities and relationships. Consists of entities , attributes , and 3 parts of the contact .

Entity: a rectangle representation.

Properties: Ellipse representation.

Contact: Diamond, a pair of one or one-to-many, many-to-many.

Design Paradigm of relational database

Relationships include relationship patterns and relationship values.

Relationship Pattern : The abstract definition of the relationship, and gives the concrete structure of the relationship;

the value of the relationship: the specific content of the relationship, reflecting the state of the relationship at a certain moment

Each tuple is a specific value that conforms to the relational pattern.

Normalization : The process of organizing a database to minimize the structure of redundant data while preserving the integrity of the stored data. Normalization must conform to the canonical rules of the relational model to prevent inconsistent data and data loss.

Paradigm : It includes the first paradigm (1NF), the second Normal (2NF), the third Normal (3NF), the fourth Normal (4NF), the Five (5NF), the Six (6NF), and the BCNF paradigm. It usually satisfies the first three paradigms.

1. The first paradigm (1NF)

① Data group Each property can contain only one value

Each array in a ② relationship must contain the same number of values

Each array must not be the same in a ③ relationship

2. Second paradigm (2NF)

On the basis of the first paradigm, it is required that every entity in a database table must be able to be divided by a single region. entity attributes must be fully dependent on the primary key and cannot be relied upon only as part of the primary key word.

such as: (Employee number, position)--(decision) (name, age, education, basic salary, performance pay, bonus)

Where (employee number)--(decision) (name, age, education)

(position) (decision) (base salary)

Should be split into three sheets:

Employee Profile form (employee number, name, age, education)

Post Salary table (post, basic salary)

Employee Payroll (Employee number, position, performance pay, bonus)

3. The third paradigm (3NF)

On the basis of the second paradigm, there is no dependency of the non-key columns on the transfer function of any candidate key columns in the relational table. That is, a relational table does not contain non-keyword information that has already been contained in other tables.

such as: (Employee number)--(decision) (Employee name, age, department number, department manager)

Implied (employee number)--(decision) (department number)--(decision) (department manager)

Should be split into:

(Employee number, employee name, age, Department number)

(Department number, department manager)

"Oracle" Introductory Learning (i)

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.