Relational Database Architecture

Parth chaudhary
Techsalo Infotech
Published in
4 min readJul 27, 2024

In this Article we are going to discuss in detail about the Architecture RDBMS(Relational Database Management System ), We will focus on the career option and Benefits of Relational Database Management System

What is Relational Database?

A relational database (RDB) is a way of structuring information in tables, rows, and columns. An RDB has the ability to establish links — or relationships–between information by joining tables, which makes it easy to understand and gain insights about the relationship between various data points.

Developed by E.F. Codd from IBM in the 1970s, the relational database model allows any table to be related to another table using a common attribute. Instead of using hierarchical structures to organize data, Codd proposed a shift to using a data model where data is stored, accessed, and related in tables without reorganizing the tables that contain them.

Why is a relational database important?

A relational database’s main benefit is the ability to connect data from different tables to obtain useful insight. This approach helps organizations of all sizes and industries decipher the relationships between different data sets from various departments.

How data is structured within a relational database can also be useful for managing access permissions. Since the relationships between data points are pre-determined and require a unique ID to reference, users only obtain relevant, pre-screened information.

RDBMS Architecture :

RDBMS Architecture encompasses the foundational structure of a Relational Database Management System. At its heart lies the database, organized into tables containing rows and columns. The SQL Engine processes user queries, generating execution plans. The Transaction Manager ensures transaction properties like ACID compliance, while the Storage Manager handles physical data storage, utilizing indexing and caching techniques for efficiency. The Query Optimizer selects optimal execution plans, while Authorization and Authentication ensure secure access. The Connection Manager manages connections, and user interfaces facilitate interactions. This orchestrated collaboration of components ensures systematic and efficient management of structured data with integrity and accessibility.

By taking small use Case:

  1. Set up the database:
  • Create a database and a table for books.
  • The books table will have columns: id, title, author, and year.

2. Perform CRUD operations:

  • Create: Add a new book.
  • Read: View all books.
  • Update: Update a book’s details.
  • Delete: Delete a book.Here’s the code:

Step 1: Set up the database

import sqlite3
# Connect to SQLite database
conn = sqlite3.connect('library.db')
c = conn.cursor()
# Create books table
c.execute('''
CREATE TABLE IF NOT EXISTS books (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
author TEXT NOT NULL,
year INTEGER NOT NULL
)
''')
# Commit changes and close the connection
conn.commit()
conn.close()

Step 2: Perform CRUD operations

Create: Add a new book

def add_book(title, author, year):
conn = sqlite3.connect('library.db')
c = conn.cursor()
c.execute('INSERT INTO books (title, author, year) VALUES (?, ?, ?)', (title, author, year))
conn.commit()
conn.close()
# Example usage
add_book('1984', 'George Orwell', 1949)
add_book('To Kill a Mockingbird', 'Harper Lee', 1960)

Read: View all books

def view_books():
conn = sqlite3.connect('library.db')
c = conn.cursor()
c.execute('SELECT * FROM books')
books = c.fetchall()
conn.close()
return books
# Example usage
for book in view_books():
print(book)

Update: Update a book’s details

def update_book(book_id, title, author, year):
conn = sqlite3.connect('library.db')
c = conn.cursor()
c.execute('''
UPDATE books
SET title = ?, author = ?, year = ?
WHERE id = ?
''', (title, author, year, book_id))
conn.commit()
conn.close()
# Example usage
update_book(1, '1984', 'George Orwell', 1950)

Delete: Delete a book

def delete_book(book_id):
conn = sqlite3.connect('library.db')
c = conn.cursor()
c.execute('DELETE FROM books WHERE id = ?', (book_id,))
conn.commit()
conn.close()
# Example usage
delete_book(2)

This example demonstrates the basic operations of an RDBMS using SQLite in Python. You can extend this to include more complex operations, handle exceptions, and improve the user interface as needed.

RDBMS

A relational database management system (RDBMS) is a program used to create, update, and manage relational databases. Some of the most well-known RDBMSs include MySQL, PostgreSQL, MariaDB, Microsoft SQL Server, and Oracle Database.

Conclusion

To conclude, RDBMS and DBMS are good frameworks for storing data in tables that correlate different types of data. This paradigm was designed by E.F. Codd during the 1970s and it replaced hierarchical systems to enhance data perspectives. An RDBMS has a structure with sections like Query Optimizer and SQL Engine that ensure quick and secure procedures on information. The usefulness of this system can be in integrating customer tables and order tables into many others hence allowing for deep data mining. MySQL, Oracle Database among other well-known RDBMS applications show how cost-effective, simple, and convenient is the technology used by many companies in various sectors of industry.

Note: We at Techsalo Infotech are a team of engineers solving complex Data engineering and Machine learning problems. Please reach out to us at sales@techsalo.com for any query on How to build these systems at scale and in the cloud.

--

--