Oracle from scratch-an introduction to relational databases

    The Oracle database system is the world's leading database management system. Together with its powerful functions, flexible configuration and high security, the Oracle database is preferred by the financial industries such as funds and banks.

    Currently, there are two main types of database positions: one is database administrators, or DBA for short; the other is database developers.

    The main job of a DBA is to be responsible for daily data maintenance and performance optimization management. The Oracle system is relatively large and complex in the database system. To become a qualified DBA, you need to master a lot of professional knowledge and knowledge in the Oracle system. It is relatively high and difficult, and of course the income is also very high. Another type of database developers, whose main job is to use the SQL language provided by the database to manipulate the data objects in the database, do not need to have a deeper understanding of database reminders, and it is easier to get started.

     1. What is a relational database

    The simple understanding of a relational database is to use relations or two-dimensional tables to store information (two-dimensional table storage information can be similar to Excel in which column information on the horizontal and vertical axis can be used to determine specific messages).

    2. Database system paradigm

    In order to standardize the relational database model, the designer of the relational database system must be intoxicated by certain rules, which is the paradigm of the relational database system . The purpose of the paradigm is to reduce data redundancy and make the database design structure reasonable. There are 3 commonly used paradigms:

    First Normal Form (1NF): If the value in the field is already a value that cannot be divided. For example: the name field in a user table, including Chinese names and English names, which means that the name field can continue to be split, then this does not meet the first normal form; the field needs to be split into The Chinese name and English name are two fields, and the data storage responsibility of each field is single and cannot be split.

    Second Normal Form (2NF): The table must have a unique primary key column. First, make sure that the existing design satisfies the first paradigm, and the second paradigm is an enhancement based on the first paradigm. In the database design, there will generally be unique gradually representing each row of data (that is, according to A certain value can be determined to have and only one piece of data). For example: each person’s ID number, each person has one and only one, and only one person can be identified based on the ID number.

    Third Normal Form (3NF): The fields in the table cannot contain non-primary key fields that have appeared in other tables. The third paradigm is a further enhancement on the basis of the first and second paradigms, and its main function is to reduce data redundancy. For example: there is a child table, a father table, and there is a field of the primary key of the father table in the child table. To query the name of the child’s father, use the primary key of the father table in the child table to query the father’s name in the father table. It also contains a father name field, so the fields in this table are non-primary key fields that have been in other tables and appear, which causes data redundancy and does not conform to the third normal form and needs to be redesigned.

    The three paradigm is the basis for designing a clear, easy-to-understand, and excellent database. Of course, because each company has different development specifications, the three paradigm is not mandatory, so there will be some designs that violate the three paradigm in the process of developers. This phenomenon is also very common. However, it is recommended that everyone try to develop according to the requirements of the three paradigms.

    3. SQL statement

    Full SQL language is Structured Query Language (Structured Query Language), which is an advanced non-procedural programming language that allows users to work on high-level data structures used to manipulate SQL database users.

The SQL language is mainly divided into the following two categories:

    The DML database operation language is mainly to complete the operation of adding, deleting, modifying and checking data. Developers use more

    DDL data definition language is mainly used to create or modify tables, views, stored procedures or users, etc. DBAs are used more often, and generally only DBAs have operation authority in the production environment.

 

If there is an error, please correct me, thank you.

Guess you like

Origin blog.csdn.net/qq_33369215/article/details/53292173