Can anyone explain to me what referential integrity constraints are? Here s an example! 20

Updated on technology 2024-03-06
8 answers
  1. Anonymous users2024-02-06

    It's just to find a star you like, the same sex, just learn from him.

  2. Anonymous users2024-02-05

    There is an article called "Sexual Restraint".

    There is another article that cites this article, and if you don't understand something, please --- the referential integrity constraint.

  3. Anonymous users2024-02-04

    Referential integrity constraints refer to the requirement that non-existent entities are not allowed to be referenced in the relationship.

    Relational integrity constraints are constraints or rules proposed for relational models to ensure the correctness and compatibility of data in databases. Integrity typically includes domain integrity, entity integrity, referential integrity, and user-defined integrity, where domain integrity, entity integrity, and referential integrity, are integrity constraints that must be met by relational models.

    Domain integrity is to ensure the reasonableness of the values of database fields. The attribute value should be the value in the domain, which is dictated by the relationship pattern. In addition, whether a property can be null or not is determined by semantics and is the main content of domain integrity constraints.

    The domain integrity constraint is the simplest, most basic constraint. In today's relational DBMS, there is generally a domain integrity constraint check.

    Entity integrity means that the primary keyword of a relationship cannot be duplicated or null. A relationship corresponds to a set of entities in the real world. Entities in the real world can be distinguished and identified from each other, that is, they should have some kind of unique identity of disturbance.

    In the relational pattern, the main keyword is used as the unique identifier, and the attribute in the main keyword cannot be taken as a null value, otherwise, it indicates that there is a non-identifiable entity in the relational pattern, which contradicts the actual situation in the real world, and such an entity is not a complete entity.

    Relationship Integrity Constraint Constraint:

    Entity integrity and referential integrity are applicable to any relational database system, and they are mainly constraints on the validity of the primary and external keyword values of the relationship. User-defined completeness is based on the requirements of the application environment and the actual needs of the data involved in a specific application.

    This constraint mechanism should generally not be provided by the application, but should be defined and verified by the relational model, and the user-defined integrity mainly includes field validity constraints and record validity.

  4. Anonymous users2024-02-03

    The correct description of the referential inhomerization constraint is ().

    a.If there is relational signaling between the two tables, there must be a referential integrity constraint.

    b.Deleting a row of data in a child table and deleting related data from the parent table is a referential integrity constraint.

    c.If you modify a piece of data in the parent table, the data in the child table of the Slip Dig will not necessarily be modified.

    d.When a new record is inserted into a child table, the data of the parent table needs to be updated.

    Correct answer: c

  5. Anonymous users2024-02-02

    Answer]: C Referential integrity is a constraint that defines the reference of the main keywords and external keywords that establish the connection between the Guanshi system. Relational databases often contain multiple relationships that are interconnected, and relationships are connected through common attributes.

    The so-called public attribute is the main keyword of a relation r (called the referenced relation or target relation) and the external keyword of another relation k (called the reference relation). If the value of the external keyword in the reference relationship k is either the same as the value of the main keyword of a tuple in the reference relationship r, or the value is null, then the reference of the main keyword and the external keyword associated between the two relationships meets the requirements of the referential integrity rule. If the external keyword of the reference relation k is also its main keyword, the main keyword shall not be taken as a null value according to the integrity requirements of the entity jujube, so the value of the external keyword of the reference relation k can actually only take the value of the main keyword that already exists in the corresponding reference relation r.

  6. Anonymous users2024-02-01

    Relational model integrity constraints include entity integrity, referential integrity, and user-defined integrity.

    In the relational model, relational integrity mainly refers to the following three aspects:

    1. Physical integrity.

    Entity integrity refers to the rules that ensure that each record's primary key column, or "entity identifier" column, is unique. Entity integrity ensures that there are no duplicate records in database tables, preventing data redundancy and inconsistencies.

    2. Referential integrity.

    It means that the outer code of each element in the reference relationship is either null or equal to the main code of an element in the reference relationship; For example, college freshmen have just come to report, and the students who have Ling Tanpei in the student table may not have had time to assign a specific class, so these students who have not yet had time to be assigned to the class in the student table have a null value (the null value represents "uncertain").

    3. User-defined integrity.

    Refers to the specific definition of a restrictive (or constrained) residuals for the value of each attribute in a relationship. For example, the gender attribute can only be taken as "male" or "female", and then there is the value range of the age buried, which can be taken from 0-130, but cannot be negative, because age cannot be negative.

    Basic terms of the relational model:

    Relationship: A relationship corresponds to a two-dimensional table, and the two-dimensional table is the name of the relationship; Attributes and Ranges: Columns in a two-dimensional table, called attributes.

    The number of attributes is called the element or degree of the relationship. The value of the column is called the ruler and is only the attribute value; The value range of the attribute value is the value range; Relationship Pattern: The row definition in a two-dimensional table, that is, the description of the relationship, is called a relationship pattern.

    Tuple: A row in a two-dimensional table, called a tuple; Component: A property value in a tuple; Key or code:

    If such an attribute exists in a relationship, the two tuples in any relationship state of the relationship have different combinations of values on the property, that is, the values of these attributes can be used to uniquely identify the tuple of the relationship.

    Hyperkey or supercode: If a certain attribute is removed from a key of a relation, it is still the key of the relation, then such a key is called the hyperkey or supercode of the relation; Candidate key or candidate code: If no attribute can be removed from a key of a relationship, otherwise it is not the key of the relationship, then the specified candidate key is called the candidate key or candidate code of the relationship.

  7. Anonymous users2024-01-31

    Refer to () the rule of completeness

    a.Let attribute a be the primary attribute of relation r, then attribute a cannot take a null value (null) bThe value of the foreign code can be null

    c.The value of the external code can only be null or the value of the corresponding master code.

    d.The value of the external code can only be the value of the corresponding master code.

    Correct answer: The value of the external code can only be null or the value of the corresponding main code.

  8. Anonymous users2024-01-30

    Answer]: The object of the integrity constraint can be relation, tuple, and column. Among them, column constraints are mainly the constraints of column type, value, range, precision, sorting, etc.

    The constraints of a tuple are the constraints on the connections between the fields in the tuple. The constraints of a relationship are the constraints of a number of relationships between groups, on a set of relationships, and between relationships.

Related questions
2 answers2024-03-06

RAID is the abbreviation of "Redundant Array of Independent Disk", which means independent redundant disk array in Chinese. Redundant disk array technology was born in 1987 and was proposed by the University of California, Berkeley. To put it simply, it is to combine N hard disks into a virtual single large-capacity hard disk through a raid controller (divided into hardware and software). >>>More

18 answers2024-03-06

First of all, your behavior is an invasion of privacy.

The second is that you don't trust people very much. >>>More

16 answers2024-03-06

Don't forget to read the instructions when you buy a pregnancy test, the instructions are more accurate and clearer. The pregnancy test stick achieves the function of pregnancy test through such a principle, that is, once the human chorionic gonadotropin in the blood is HCG positive, the blood positive will be excreted through the urine, and the hcg positive pregnancy test stick in the urine will show two bars. When using the pregnancy test stick, you should read the instructions, and keep a reasonable urine sample, which should not be too little or too much, not too concentrated or too diluted. >>>More

8 answers2024-03-06

Suffering losses is a blessing, which is a mentality of being a person who does not care about personal gains and losses, which is what Buddhism says, but do good deeds, and don't ask about the future. One of the advantages of this is that you have peace of mind, you may have some losses objectively, but subjectively you do feel very satisfied, which is conducive to your physical and mental health, and this is relatively easy to operate; The second benefit is that: >>>More

9 answers2024-03-06

It is something that soothes the mind and makes your heart suddenly brighten.