The Wayback Machine - https://web.archive.org/web/20240709004256/https://www.geeksforgeeks.org/spurious-tuples-in-dbms/
Open In App

Spurious Tuples in DBMS

Last Updated : 29 May, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In Database Management System (DBMS), data is represented in a tabular form through attributes and tuples i.e., columns and rows. There are various operations (insert, delete, update, modify, etc.) that we can perform on tables. One such operation is JOIN. When we combine two tables into one, we call it a join and it is denoted by ⨝. Spurious Tuples: Spurious Tuples are those rows in a table, which occur as a result of joining two tables in the wrong manner. They are extra tuples (rows) that might not be required. If a relation is denoted by R, and its decomposed relations are denoted by R1, R2, R3…Rn, then, the condition for not getting any Spurious Tuple is denoted by,

R1 ⨝ R2 ⨝ R3 .... ⨝ Rn = R

Whereas the condition for getting Spurious Tuples is denoted by,

R ⊂ R1 ⨝ R2 ⨝ R3 .... ⨝ Rn

Example-1: Example to check if the given relation contains Spurious Tuples. Let R be a Relation, and R1 and R2 be relations that we get after decomposing R. After performing the join operation of relations R1 and R2 (R1 ⨝ R2), we get back the original relation R. The condition for no spurious tuples, R1 ⨝ R2 = R, is met. Hence, we do not get any Spurious Tuples. Conclusion – No Spurious Tuple exists. Example-2: Example to check if the given relation contains Spurious Tuples. Let R be a Relation, and R1 and R2 be relations that we get after decomposing R. After performing the join operation of relations R1 and R2 (R1 ⨝ R2), we do not get back the original relation R. The condition for spurious tuples, R ⊂ R1 ⨝ R2, is met. Hence, we get Spurious Tuples. Conclusion – Spurious Tuples exist. Note – Rows in DBMS are called tuples. Whereas columns in DBMS are called attributes. Spurious Tuples can be remembered as extra rows in the table. The natural join leading to Spurious Tuples is called Lossy Join. The natural join not resulting in Spurious Tuples is called Lossless Join.



Similar Reads

Introduction of Relational Algebra in DBMS
Pre-Requisite: Relational Model in DBMS Relational Algebra is a procedural query language. Relational algebra mainly provides a theoretical foundation for relational databases and SQL. The main purpose of using Relational Algebra is to define operators that transform one or more input relations into an output relation. Given that these operators ac
4 min read
Need for DBMS
A Data Base Management System is a system software for easy, efficient and reliable data processing and management. It can be used for: Creation of a database.Retrieval of information from the database.Updating the database.Managing a database.Multiple User InterfaceData scalability, expandability and flexibility: We can change schema of the databa
4 min read
Introduction of Relational Model and Codd Rules in DBMS
Pre-Requisite: Relational Model in DBMS It was proposed by Dr. E.F. Codd. It uses the concept of relations to represent each and every file. Relations are Two-Dimensional Tables. It is easy to implement and easy to simplification in the operations to manipulate the data. This is the most popular data model. It is simple to implement. It uses the pr
12 min read
Thomas Write Rule in DBMS
The "write rule" in database management systems (DBMS) refers to a principle that governs how changes to the database are handled. Specifically, the write rule states that any modification to a database must be written to disk before control is returned to the user. In other words, when a user executes a command that modifies the database (such as
5 min read
Armstrong's Axioms in Functional Dependency in DBMS
Prerequisite - Functional Dependencies This article contains Armstrong's Axioms and how Armstrong's Axioms are used to decide about the functional dependency on the database. We will be also learning about the Secondary Rules and Armstrong Relations. We will learn each thing in detail. Before moving ahead, you must have a knowledge of Functional De
4 min read
Transaction Isolation Levels in DBMS
Prerequisite - Concurrency control in DBMS, ACID Properties in DBMS As we know, in order to maintain consistency in a database, it follows ACID properties. Among these four properties (Atomicity, Consistency, Isolation, and Durability) Isolation determines how transaction integrity is visible to other users and systems. It means that a transaction
5 min read
Database Objects in DBMS
A database object is any defined object in a database that is used to store or reference data.Anything which we make from create command is known as Database Object.It can be used to hold and manipulate the data.Some of the examples of database objects are : view, sequence, indexes, etc. Table - Basic unit of storage; composed rows and columns View
4 min read
Starvation in DBMS
Starvation or Livelock is the situation when a transaction has to wait for an indefinite period of time to acquire a lock. Reasons for Starvation:If the waiting scheme for locked items is unfair. ( priority queue )Victim selection (the same transaction is selected as a victim repeatedly )Resource leak.Via denial-of-service attack.Starvation can be
5 min read
Graph Based Concurrency Control Protocol in DBMS
Graph-based concurrency control protocols are used in database management systems (DBMS) to ensure that concurrent transactions do not interfere with each other and maintain the consistency of the database. In graph-based concurrency control, transactions are represented as nodes in a graph, and the conflicts between transactions are represented as
4 min read
Introduction to TimeStamp and Deadlock Prevention Schemes in DBMS
Deadlock occurs when each transaction T in a schedule of two or more transactions waiting for some item locked by some other transaction T' in the set. Thus, both end up in a deadlock situation, waiting for the other to release the lock on the item. Deadlocks are a common problem and we have introduced the problem while solving the Concurrency Cont
7 min read
Article Tags :