Basic concepts of databases

Source: Internet
Author: User

Basic Concepts

To understand the paradigm, you first have to know what a relational database is, and if you don't, I can simply not simply say that a relational database uses a two-dimensional table to hold data. Between table and table can ... (Omit 10W words).
Then you should understand the following concepts:

    • things that exist in the real world and can be distinguished. such as "A student", "a book", "a course" and so on. It is worth emphasizing that the word "things" here is not only the "things" that can be seen and touched, but also the virtual one, rather "the relationship between the teacher and the school".
    • properties: The textbook is interpreted as: "An entity has an attribute", thus, the first attribute is a logical concept, for example, "Gender" is a property of "human". In a relational database, a property is a physical concept, and attributes can be thought of as "a column in a table."
    • : a row in a table is a tuple.
    • component: A property value of the tuple. In a relational database, it is an atomic operation, that is, when the relational database is doing anything, the attribute is "non-divided." Otherwise it's not a relational database.
    • code: the table can uniquely determine one of the properties of a tuple (or "). If there is more than one such code, then everyone is called candidate code, we pick one out of the candidate code to do the boss, it is called main code.
    • full code: If a code contains all the attributes, the code is full size.
    • an attribute is the primary attribute as long as it appears in any candidate code.
    • non-primary property: In contrast to the above, there is no candidate code, this property is a non-primary attribute.
    • a property (or attribute group), it is not a code, but its other table code, it is the outer code.

function dependency

Set R (U) is a relationship pattern on the attribute set U, and X and Y are a subset of U.  If any two possible relationships with R (U) R1, R2, if r1[x]=r2[x], then r1[y]=r2[y], or if r1[y] is not equal to R2[y], then r1[x] is not equal to r2[x], called X determines y, or y depends on X. Alternatively, set X, Y is the two attribute set of the relationship R, and when the X attribute values of any two tuples in R are the same at any time, their Y attribute values are the same, then they are said to be y, or the Y function depends on X. The above paragraph is the words of some textbooks, it is not easy to understand. For example, in the design of the student table, a student's school number can determine the student's name, can also be called the name attribute depends on the school number, for the reality, is that if you know a student's school number, you will be able to know the student's name, this is the name depends on the number, this is the function of dependence, the function It can be divided into full function dependence, partial function dependence and transfer function dependence. The trivial function relies on the existence of a function-dependent x→y, a set of attribute functions that determine all of its subsets, which is called trivial function dependencies, when the attribute set Y in the relationship is a subset of the attribute set X (y⊆x). Example: (school number, name) can be introduced name, this is definitely nonsense, hahaha so for any relationship model, ordinary dependence, always set up, if not specifically stated, is generally discussed non-trivial dependence.

The non-trivial function relies on the existence of a function dependency x→y when the attribute set Y in the relationship is not a subset of the attribute set X, which is called a non-trivial function dependency. function dependency is not related to the specific data in the relationship, it is determined by the scene, is a kind of semantic things, and plainly is the relationship between these attributes in life. The full function dependency set X, Y is the two attribute set of the relationship R, X ' is the true subset of X, there is x→y, but for each x ' there is X '!→y, then the Y full function is called X. Example: (study number, course number) → results, study number can not be introduced results, the course number can not be introduced, so (school number, course number) → The result is a complete function dependent part of the function dependent set X, Y is a relationship R two sets of attributes, existence x→y, if X ' is the true subset of x, there is X ' →y The Y function is said to be dependent on X.  Example: (school number, name) → Gender, the study number can not need the name of this attribute, the direct introduction of gender, so (school number, name) → Sex is part of the function dependent transfer function dependency set X, Y, Z is a different set of properties in the relationship R, there is x→y (Y!→x), Y→z, the Z-transfer function is  Paradigm 6 Properties 1, the column is homogeneous, that is, the component in each column is the same type of data, from the same domain.  2, the column can be out of the same field, the name of each of them as a property, different properties to give different property names. 3, the order of the column does not matter, that is, the order of the column can be arbitrarily exchanged.

Basic concepts of 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.