Database Practical questions and Answers

Source: Internet
Author: User

1. Why are tuples in relationships not sequential?

2. Why is a duplicate tuple not allowed in a relationship?

3. What is the difference between a relationship and a regular table or file?

4. What is the difference between Cartesian product, equivalent connection and natural join?

1. A: Because a relationship is a collection, it does not take into account the order between tuples, that is, there is no row order.

2. A: If there is a duplicate tuple in the relationship, then the key cannot be used to identify the unique tuple. Therefore, the relationship is limited in the relational model.

3. A: In a nutshell, relationships are a standardized two-dimensional form in which relationships are regulated by the following normative constraints:

(1) Each attribute value in a relationship is not decomposed.

(2) The same tuple (no duplicate tuples) is not allowed in the relationship.

(3) Because a relationship is a collection, the order of tuples is not considered, that is, there is no row order.

(4) In tuples, attributes are theoretically unordered, but they are used to consider the order of the columns.

4. A: The Cartesian product operates on two relationships R and S, and the number of tuples in the relationship is the product of the number of tuples in two relationships. The equivalent join is the selection operation on the result of the Cartesian product, and selects the tuple with the same component value as the first part of the relation (R+J). A natural connection is a projection operation on the basis of an equivalent join (conditional on the equality of public property values), removing the Public property column in S, and when two relationships have no public properties, Natural connections are converted into Cartesian product.

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.