in Databases retagged by
1,472 views
0 votes
0 votes
I want to know as we know codd's rule says that no two tuples in a relation should be same. i.e we can not have 2 tuples with same values in clm feilds. now to maintain these constraints, we choose to have some key over the relation which can uniquely identify relation. but we know that in SQL you can have 2 tuples with same values as this is the foundational block of multiset operations which we can perform in SQL. so my ques is SQL does not follow codd rule! right??  by this argument and if it does not follow, so in case of table having mutiset values, (as there are no keys present), how Dbms do indexing to retrive records?

someone help me on this pls.
in Databases retagged by
1.5k views

4 Comments

see first thing is no 2 tuples with same values in a RDBMS is allowed....we dont make any such datat a base at the first place itself...
suppose u want to do union all ..in the above pic its just an instance of the relation which u have extracted using the SQL command...do whatever u want to do over it...no worries..now i got ur point and yes SQL doesnt follow this may or may not will be the right word....but ur original data in RDMS is intact

when SQL can violate that also?
if u perform some commands like update etc in the orignal RDBMS...and if any key constrraint gets violated u have to cover up for that

0
0

see here sudsho https://www.youtube.com/watch?v=iCQNMszwPuY

 sometimes there are reuirements of multiset table.

0
0
Relational algebra think of a relation as a set and hence, set cant have duplicates. Also, I dont know but relational algebra is theoretical part.

 

Practically implemented is SQL and in SQL, its costly to eliminate duplicates.
0
0

Please log in or register to answer this question.

Related questions