Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6.1. How do the relations (tables) in SQL differ from the relations defined formally in Chapter 3? Discuss the other differences in terminology. Why does
6.1. How do the relations (tables) in SQL differ from the relations defined formally in Chapter 3? Discuss the other differences in terminology. Why does SQL allow duplicate tuples in a table or in a query result?
DATABASE PLEASE TYPE ANSWER I have this information. can you verify?
SQL allows a table (relation) to have two or more tuples that are identical in all their attribute values. Hence, in general, an SQL table is not a set of tuples, because a set does not allow two identical members, rather, it is a multiset of tuples. Some SQL relations are constrained to be sets because a key constraint has been declared or because of DISTINCT option has been used in SELECT statement. On contrary relation defined formally says that arelation is set of tuples that is, same values are not allowed for any tuple Correspondence between ER and Relational Model can help in understanding other differences in terminology. Relational Model ER Model Entity type Entity relation 1:1 or 1:N relationship type Foreign keytor relationship type) MN relationship type Relationship relation and two foreign keys n-ary relationship type Relationship relation and n foreign keys Simple Attributes Attribute Composite attributes Set of simple component attribute Multivalued attributes Relation and foreign keys Domain Value set Key attributes Primary or secondary key SQL allows duplicate tuples for following reasons: Duplicate elimination is a expensive operation. 1. 2. User may want to see duplicate tuples in the result of query 3. When an aggregate function is applied to tuples, in most cases user don't want to remove duplicatesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started