Software Development Exam  >  Software Development Notes  >  Database Management System (DBMS)  >  Other Relational Languages - Database Management System

Other Relational Languages - Database Management System | Database Management System (DBMS) - Software Development PDF Download

Introduction

When it comes to managing and querying databases, Structured Query Language (SQL) is the most widely used language. However, there are other relational languages that can be employed in Database Management Systems (DBMS) to interact with databases. In this article, we will explore some of these languages and understand their basic concepts, syntax, and usage.

Relational Algebra

Relational Algebra is a procedural query language used to manipulate and retrieve data in relational databases. It consists of a set of operations that can be performed on relations to generate new relations. Some commonly used operations in Relational Algebra are:

(i) Selection: The selection operation is used to extract tuples from a relation based on specified conditions. It is denoted by the sigma symbol (σ). For example:

σ(age > 30)(Employees)

This code snippet selects all the employees from the "Employees" relation who are older than 30.

(ii) Projection: The projection operation is used to select specific attributes from a relation while discarding the rest. It is denoted by the pi symbol (π). For example:

π(name, age)(Employees)

This code snippet selects only the "name" and "age" attributes from the "Employees" relation.

(iii) Join: The join operation is used to combine tuples from two or more relations based on a common attribute. It is denoted by the cross (×) symbol. For example:

Employees × Departments

This code snippet joins the "Employees" and "Departments" relations based on the common attribute "department_id."

(iv) Union: The union operation is used to combine tuples from two relations without any duplicate entries. It is denoted by the U symbol. For example:

Employees U Managers

This code snippet combines the tuples from the "Employees" and "Managers" relations while eliminating any duplicate entries.

Tuple Relational Calculus

Tuple Relational Calculus is a non-procedural query language used to specify queries in terms of the tuples to be retrieved. It is based on the concept of first-order logic. Consider the following example:

{T | T ∈ Employees ∧ T.age > 30}

This code snippet retrieves all tuples from the "Employees" relation where the age is greater than 30.

Domain Relational Calculus

Domain Relational Calculus is another non-procedural query language that specifies queries in terms of the attributes of the tuples to be retrieved. It is also based on the concept of first-order logic. Consider the following example:

{T.name | T ∈ Employees ∧ T.age > 30}

This code snippet retrieves only the "name" attribute from tuples in the "Employees" relation where the age is greater than 30.

Sample Problems

Retrieve the names of all employees whose salary is greater than $50,000.

π(name)(σ(salary > 50000)(Employees))

Retrieve the names and ages of employees who belong to the "Sales" department.

π(name, age)(Employees × σ(department = "Sales")(Departments))

Retrieve the names of employees who do not have a manager.

π(name)(Employees - (π(manager)(Employees)))

Conclusion

While SQL is the dominant language in DBMS, understanding other relational languages such as Relational Algebra, Tuple Relational Calculus, and Domain Relational Calculus can provide a deeper understanding of the foundational principles of working with databases. These languages offer alternative ways to manipulate and query data, expanding your toolkit as a database professional.

The document Other Relational Languages - Database Management System | Database Management System (DBMS) - Software Development is a part of the Software Development Course Database Management System (DBMS).
All you need of Software Development at this link: Software Development
75 videos|44 docs

Top Courses for Software Development

75 videos|44 docs
Download as PDF
Explore Courses for Software Development exam

Top Courses for Software Development

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

mock tests for examination

,

study material

,

Extra Questions

,

MCQs

,

Objective type Questions

,

Sample Paper

,

shortcuts and tricks

,

Previous Year Questions with Solutions

,

pdf

,

past year papers

,

Other Relational Languages - Database Management System | Database Management System (DBMS) - Software Development

,

video lectures

,

Semester Notes

,

Other Relational Languages - Database Management System | Database Management System (DBMS) - Software Development

,

Free

,

ppt

,

practice quizzes

,

Viva Questions

,

Exam

,

Other Relational Languages - Database Management System | Database Management System (DBMS) - Software Development

,

Summary

,

Important questions

;