Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Relational Model in DBMS
Next article icon

Relational Query Language in DBMS

Last Updated : 06 Oct, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

SQL has its own querying methods to interact with the database. But how do these queries work in the database? These queries work similarly to Relational Algebra that we study in mathematics. In the database, we have tables participating in relational Algebra.

Relational Database systems are expected to be equipped with a query language that assists users to query the database. Relational Query Language is used by the user to communicate with the database user requests for the information from the database. Relational algebra breaks the user requests and instructs the DBMS to execute the requests. It is the language by which the user communicates with the database. They are generally on a higher level than any other programming language. These relational query languages can be Procedural and Non-Procedural.

Types of Relational Query Language

There are two types of relational query language:

  • Procedural Query Language
  • Non-Procedural Language

Procedural Query Language

In Procedural Language, the user instructs the system to perform a series of operations on the database to produce the desired results. Users tell what data to be retrieved from the database and how to retrieve it. Procedural Query Language performs a set of queries instructing the DBMS to perform various transactions in sequence to meet user requests.

Relational Algebra is a Procedural Query Language

Relational Algebra could be defined as the set of operations on relations.

There are a few operators that are used in relational algebra -

  1. Select (sigma): Returns rows of the input relation that satisfy the provided predicate. It is unary Operator means requires only one operand.
  2. Projection (ℼ): Show the list of those attribute which we desire to appear and rest other attributes are eliminated from the table. It seperates the table vertically.
  3. Set Difference (-): It returns the difference between two relations . If we have two relations R and S them R-S will return all the tuples (row) which are in relation R but not in Relation S , It is binary operator.
  4. Cartesian Product (X): Combines every tuple (row) of one table with every tuple (row) in other table ,also referred as cross Product . It is a binary operator.
  5. Union (U): Outputs the union of tuples from both the relations. Duplicate tuples are eliminated automatically. It is a binary operator means it require two operands.

Non-Procedural Language

In Non Procedural Language user outlines the desired information without giving a specific procedure or without telling the steps by step process for attaining the information. It only gives a single Query on one or more tables to get .The user tells what is to be retrieved from the database but does not tell how to accomplish it.

For Example: get the name and the contact number of the student with a Particular ID will have a single query on STUDENT table.

Relational Calculus is a Non Procedural Language .

Relational Calculus exists in two forms:

  1. Tuple Relational Calculus (TRC): Tuple Relational Calculus is a non procedural query language , It is used for selecting the tuples that satisfy the given condition or predicate . The result of the relation can have one or more tuples (row).
  2. Domain Relational Calculus (DRC): Domain Relational Calculus is a Non Procedural Query Language , the records are filtered based on the domains , DRC uses the list of attributes to be selected from relational based on the condition.

Next Article
Relational Model in DBMS
author
kritikapathak2004
Improve
Article Tags :
  • DBMS
  • Geeks Premier League
  • Geeks Premier League 2023

Similar Reads

  • What is Temporal Query Language in DBMS?
    TQL is known as a Temporal Query Language and it is a part of Database Management Systems (DBMS) to make possible interaction with the temporal data. Temporal data involves information that is dynamic or can be described in terms of time, for example, historical books, dated events, or compositions
    7 min read
  • Relational Model in DBMS
    The Relational Model represents data and their relationships through a collection of tables. Each table also known as a relation consists of rows and columns. Every column has a unique name and corresponds to a specific attribute, while each row contains a set of related data values representing a r
    11 min read
  • What is Object-Relational Mapping (ORM) in DBMS?
    Object-relational mapping (ORM) is a key concept in the field of Database Management Systems (DBMS), addressing the bridge between the object-oriented programming approach and relational databases. ORM is critical in data interaction simplification, code optimization, and smooth blending of applicat
    7 min read
  • Relational Query Evaluation | Set 1
    There is a need for conversion of relational query to algebraic expressions. This expression is operated on so that final output is received. The relational algebra operators that are present are Union, Select, Join, Project, etc. These are used to formulate relational query for adequate results. Gr
    3 min read
  • What is a Query in DBMS?
    In the field of Database Management Systems (DBMS), a query serves as a fundamental tool for retrieving, manipulating, and managing data stored within a database. Queries act as the bridge between users and databases, enabling them to communicate with the system to extract specific information or pe
    5 min read
  • Relation Schema in DBMS
    Relation schema defines the design and structure of the relation or table in the database. It is the way of representation of relation states in such a way that every relation database state fulfills the integrity constraints set (Like Primary key, Foreign Key, Not null, Unique constraints) on a rel
    6 min read
  • Creating APIs for Relational Database
    In the era of software development, relational databases stand as pillars of structured data storage and organization. These databases, with their tables, rows, and columns, provide a reliable framework for managing information. But what makes them truly powerful is their collaboration with APIs, th
    8 min read
  • Domain Relational Calculus in DBMS
    Domain Relational Calculus is a non-procedural query language equivalent in power to Tuple Relational Calculus. Domain Relational Calculus provides only the description of the query but it does not provide the methods to solve it. In Domain Relational Calculus, a query is expressed as, { < x1, x2
    2 min read
  • Hibernate - Query Language
    polymorphicHibernate is a Java framework that makes it easier to create database-interactive Java applications. In HQL, instead of a table name, it uses a class name. As a result, it is a query language that is database-independent. Hibernate converts HQL queries into SQL queries, which are used to
    4 min read
  • What is Relationship in DBMS?
    A database is a structured data set that is usually electronically written in a computer system and stored as data. With their primary purpose being to maintain, keep, and extract data correctly, databases are important. In many practical situations, data is never an isolated file, and its correlati
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences