---database of soft test

Source: Internet
Author: User

When the soft test is carried out, the database part is studied again, and the database concept is summarized in part:

Among them, the macro, we are faced with the database is from the ER diagram, from the conceptual model to the logical model to the final internal model, the approximate database is out of shape, and then according to the relationship between the key, paradigm, function dependence, etc. to optimize the database structure, to avoid data redundancy. After the database is built, we use the process is to change the database additions and deletions, the most basic operation is the operation of the relational operations and tuple operations, through different operations from the database to perform the operation we respond to.

Easy to confuse knowledge analysis:
1: Super Key, candidate key, primary key

In the relationship of the three, it is similar to the inheritance relationship in object-oriented, the primary key as the parent class, and the super-key and the candidate key are the subclasses of the primary key. A hyperlink is a collection of properties that uniquely identifies a tuple, a candidate key that is a property set or attribute after a super-key removes the extra attribute, and the primary key is the key that the user chooses from the candidate key as the tuple identity.

Student (school number, name, gender, professional number, age)

Where (school number, name) is a super-key (a collection of attributes that uniquely identifies a tuple), the number is a candidate key (removing the extra attribute of the name), and also the primary key.

2: The model of the paradigm, the first paradigm, the non-re-segmentation of attributes

Student (school number, name, contact information)

One of the contacts can be divided into a variety of QQ, mobile phone number, etc., so do not meet the first paradigm, should be the contact method decomposition, or qualitative as a kind of contact.

Modified as: Student (school number, name, QQ, mobile number)

The second paradigm is not dependent on local functions, only the relational pattern with complete function dependence

Course Selection Relationship (School number, course number, score, credits)

It is known that the key word is (school number, course number), and the credit only function depends on the course number, so there is a partial dependency. If the second paradigm is not satisfied, the keywords should be decomposed.

Student Relations (School number, course number, score) course Relationship (course number, credits)

The third paradigm is nothing more than the relationship pattern of the principal attribute transfer function dependency

Student (school number, name, Department, address)

In which there is the number ―> Department-> Department address, and the Department of-> School number does not exist, that is, the study number-> address this layer of relationship is through the Department of the-> Department address to indirectly achieve rather than directly decided. The third paradigm is that there is no transitive dependency. It should be decomposed.

Student (school number, name, Department) department (name, department address)

The relationship of the three is also similar to the inheritance relation, the first paradigm is the parent class, the second third paradigm is its subclass.

the database and data structure solves the problem of datastore from different angles, and the database is more like a kind of storage method which has friendly and convenient operation way on the shoulder of data structure. But we know the basics of the database and we need to look at the underlying stuff-data structures (see next blog post)

---database of soft test

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.