Skip to main content
DevHivesBlog

Search the blog

Find a post by title, tag or topic

What Is an RDBMS? Tables, Keys, and the Meaning Explained

An RDBMS stores data in linked tables made of rows and columns. Keys connect the tables, and every SQL command you learn works on this structure. This guide explains the meaning, features, and how to answer interview questions about it.

Arnab Biswas10 min read
WhatsApp
A SQL table with one row highlighted, showing how RDBMS organizes data in linked tables.

Say an interviewer asks you one question: "Is MySQL a DBMS or an RDBMS?" Many freshers freeze, because they memorized commands but never learned the idea underneath them. The full interview answer is in the last section.

An RDBMS (relational database management system) is software that stores data in linked tables made of rows and columns. Keys connect the tables to each other. A plain DBMS can store data too, but it usually keeps it as files with no links between them. Every SQL command you learn works on this table-and-key structure.

RDBMS meaning: tables, rows and columns

The full form is Relational Database Management System, and its basic unit is the table, where columns are fields and rows are records, as the W3Schools MySQL RDBMS page defines it. The RDBMS is the program. The relational database is the data it looks after.

Columns run vertically. Each one holds one kind of fact, such as a customer's name or city. Rows run horizontally. Each one is a single record, such as one customer.

"Relational" means the tables are related: they share common columns, so data in one table can point to data in another. Wikipedia's article on relational databases uses more formal words for the same picture. A table is a "relation" and a row is a "tuple". A column is an "attribute".

Picture a school. One table lists students, another lists courses, and a third records who enrolled in what. None of them makes sense alone. Together they answer real questions, like "which students take Physics?"

Once you see tables as the unit, other SQL topics get easier. For example, the difference between removing rows and removing a whole table is clearer after this; I cover it in DELETE vs TRUNCATE vs DROP in SQL.

Watch: What is RDBMS? full Explanation | Learn Coding | #rdbms — Learn Coding (YouTube)

Primary keys and foreign keys connect the tables

A primary key identifies one row and can never be empty, while a foreign key in another table points back to it, as Wikipedia's relational database article explains. These two kinds of key are what turn separate tables into one connected database.

Here are the three terms you need, in plain words:

Primary key
A column whose value is unique for every row and is never empty (never NULL). A customer ID is a common example.
Foreign key
A column in one table that stores the primary key of a row in another table. It is the link between the two.
Domain
The set of values a column is allowed to hold. An "age" column might only accept whole numbers from zero upward.

Why bother with keys at all? Without them, you would copy a customer's contact details, such as name and address, into every order they place. Say one customer places a dozen orders, then moves house. You now have to update a dozen rows, and missing one leaves your data wrong.

With keys, the customer's details live in exactly one row. Each order stores only the customer's ID. Change the address once, and every order sees the new one.

In the Northwind sample data, each order stores a CustomerID, and that one column is enough to find the customer who placed it, as the W3Schools RDBMS page shows. Northwind is a sample database that W3Schools and other tutorials use for practice.

Orders holds two foreign keys, so one row leads to both its customer and its shipper.
Orders holds two foreign keys, so one row leads to both its customer and its shipper.

Here are the two tables, simplified from that example, with the keys written out:

CREATE TABLE Customers (
  CustomerID   INT PRIMARY KEY,
  CustomerName VARCHAR(100) NOT NULL,
  City         VARCHAR(50),
  Country      VARCHAR(50)
);
CREATE TABLE Orders (
  OrderID    INT PRIMARY KEY,
  CustomerID INT,
  OrderDate  DATE,
  ShipperID  INT,
  FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)
);

The PRIMARY KEY line in Customers says no two customers can share an ID. The FOREIGN KEY line in Orders says every CustomerID in an order must match a real customer. Below is a small slice of the sample rows, taken from the W3Schools Northwind data:

TableKey columnOther columns
CustomersCustomerID = 2Ana Trujillo Emparedados y helados, México D.F., Mexico
CustomersCustomerID = 3Antonio Moreno Taquería, México D.F., Mexico
OrdersOrderID = 10308CustomerID = 2, ShipperID = 3

Now walk through it. Order 10308 holds the value 2 in its CustomerID column. Go to Customers, find the row where CustomerID is 2, and you get Ana Trujillo's shop. The order never stored her name, yet you found it in one step.

A JOIN asks the RDBMS to do that lookup for you:

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
JOIN Customers ON Orders.CustomerID = Customers.CustomerID;

The ON line is the key relationship in written form. It tells the database which column in each table should match. For order 10308 the output row pairs 10308 with Ana Trujillo Emparedados y helados, plus the order date.

Orders also links to a third table. Its ShipperID column points to a Shippers table, which lists the delivery companies. So one order row connects to a customer on one side and a shipper on the other. That chain of links is the "relational" idea doing its job.

DBMS vs RDBMS: the full comparison table

The two differ in six places: how data is stored, how tables relate, normalization, ACID support, number of users, and distributed support, according to GeeksforGeeks, TechTarget and Great Learning. I combined their lists into one table. Read it as the textbook answer that exam and interview papers expect. It describes older file-based systems, not every non-relational database in use today.

Point of differenceOlder file-based DBMSRDBMS
How data is storedAs filesAs tables of rows and columns
RelationshipsNo links between data setsTables linked through primary and foreign keys
NormalizationNot supportedSupported (splitting data so each fact is stored once)
ACID transactionsNot supportedSupported
Users at onceUsually a single userMany users at the same time
Distributed databasesNot supportedSupported (data spread across several machines)

Sources: GeeksforGeeks, TechTarget, Great Learning.

The sources word this differently. GeeksforGeeks and Great Learning present it as a strict yes-or-no list. TechTarget's answer page explains it in prose and treats an RDBMS as one type of DBMS. For an interview, the table works. In real life, read "DBMS" in the table as "a DBMS that is not relational".

Normalization deserves one more sentence, because the term scares beginners. It is the same thing you saw in the worked example: moving customer details out of Orders into their own table, so nothing is copied.

RDBMS features: integrity rules and ACID

An RDBMS protects your data with four integrity rules and four transaction guarantees, as Great Learning and GeeksforGeeks list them. "Integrity" here means the data stays correct and consistent.

The integrity rules, each with an example from the Northwind tables:

  • Entity integrity: no two rows can be duplicates. Two customers cannot share the same CustomerID.
  • Referential integrity: a row that other rows point to cannot simply be deleted. You cannot delete a customer while orders still carry their CustomerID. MySQL answers with error 1451: Cannot delete or update a parent row: a foreign key constraint fails.
  • Domain integrity: each value must fit its column's allowed set. An OrderDate column rejects the text "next Tuesday".
  • User-defined integrity: rules your business adds. A shop might refuse any order with zero items.

Four transaction guarantees go by the name ACID. A transaction is a group of changes that belong together. A bank transfer is the clearest case: money leaves your account and arrives in a friend's account. That works the same way whether you use UPI in India or Zelle in the US.

  1. Atomicity

    Both steps happen, or neither does. The money never leaves your account without reaching your friend's.

  2. Consistency

    The database moves from one valid state to another. The total money across both accounts stays the same.

  3. Isolation

    Two transfers running at the same moment do not mix up each other's numbers.

  4. Durability

    Once the bank says "done", the transfer survives a power cut or a crash.

This is why banks trust relational databases with balances. A half-finished transfer would be a real loss for a real person.

Common RDBMS examples and where they are used

MySQL, Oracle, Microsoft SQL Server, Azure SQL and IBM Db2 are all RDBMS products, used for banking, online shops, hospital records and school systems, according to TechTarget and W3Schools. Here is what each one is in half a line:

  • MySQL: free and open source, common in web apps and in college labs.
  • Oracle Database: a paid product, popular with large companies and banks.
  • Microsoft SQL Server: Microsoft's RDBMS, often paired with Windows and .NET apps.
  • Azure SQL: SQL Server's engine run for you in Microsoft's cloud.
  • IBM Db2: IBM's RDBMS, found in older enterprise systems.

Uses per TechTarget and GeeksforGeeks share a need for linked data. An online shop links customers to orders. A hospital links patients to visits. A college links students to courses and marks. A CRM (customer relationship management tool) links sales staff to the clients they handle.

This idea predates most of these products. E.F. Codd at IBM proposed the relational model in his 1970 paper "A Relational Model of Data for Large Shared Data Banks", and relational databases became the dominant type in the 1980s, as Wikipedia records. TechTarget credits Oracle with the first commercial RDBMS; see TechTarget.

How to answer the interview trick question

Answer in three parts: say it stores data in tables, say keys link those tables, then name one product and one feature such as ACID. That structure follows how TechTarget separates the two terms, and you can say it in under twenty seconds.

  1. Storage: "MySQL is an RDBMS. It stores data in tables of rows and columns."
  2. Links: "Tables connect through primary keys and foreign keys, like Orders pointing to Customers by CustomerID."
  3. Product and feature: "Since every RDBMS is a type of DBMS, MySQL is both. It also supports ACID transactions, which plain file-based systems do not."

Two mistakes come up often. The first is saying "RDBMS is just SQL". SQL is the language you type. The RDBMS is the software that reads that language and runs it on the stored tables. MySQL and Oracle both understand SQL, but they are different programs.

Another slip is saying "MySQL is a DBMS but not an RDBMS". That treats the two as opposites. They are not. RDBMS is a narrower group inside DBMS, the way every square is also a rectangle.

Strong answer

  • Names tables and keys
  • Gives one real product and one feature
  • Says an RDBMS is a type of DBMS

Weak answer

  • "It's the database where you write SQL"
  • Treats DBMS and RDBMS as opposites
  • Lists commands instead of explaining the structure

Interviewers sometimes follow this up with a query question, because it tests whether you can use the keys you just described. One common follow-up asks for the second-highest salary in a table, covered in how to find the second-highest salary in SQL.

Your next step today: open a free MySQL or SQLite editor in your browser. Create the Customers and Orders tables from the worked example above, insert three rows, and run the JOIN. Then close the editor and say the three-part interview answer out loud once.

ShareWhatsAppLinkedInX

Picked from the tags and topic of this post.

A table with one row highlighted, showing a data change among SQL commands.
technology5 min read

DML Commands in SQL Explained: INSERT, UPDATE, DELETE Drills

DML commands in SQL are INSERT, UPDATE, and DELETE, and they change data inside tables. This post walks you through DDL, DML, DCL, and TCL with runnable examples and interview-ready drills.

Arnab Biswas