top of page

Relational Database

What is a Database?

  • A database is a location to store and retrieve data.

  • eg. Excel Sheet a database to store data.

  • Here are some DBMS softwares.

MS Acces

LibreOffice Base

dBase

  • These programmes create and maintain a database.

  • The management system allows users to store, modify, and extract information from that database using Querying.

What is a Relational Database?

  • A database organized in terms of the relational model is a relational database.

  • A relational database is a digital database based on the relational model of data.

  • This is called relational database because all the data is stored in different tables and relations are established using primary keys or other keys known as Foreign Keys.

A relational database contains two or more tables that are related to each other.

one

many

many

one

table 1

table 2

table 3

It gives an overview of how does all the data come together and work together in a Relational Database.

  • Most relational databases use the SQL data definition and query language.

  • Here all data is represented in terms of records (rows/tuples), grouped into relations.

  • A software system used to maintain relational databases is a relational database management system (RDBMS).

  • eg. of RDBMS software:

MySQL

Oracle

SQL Server

  • In database management systems, a key is a field that you use to sort data.

  •  It also establishes relationship among tables.

  • The foreign key is defined in a second table, but it refers to the primary key or a unique key in the first table.

In the relational model, related records are linked together with a "key".

  • RDBMS allows a user to filter out all the data they are looking for.

  • Virtually all relational database systems use SQL (Structured Query Language) for querying and maintaining the database.

RDBMS Terminology

To use an RDBMS software, we should aware of some important terminologies.

Database

  • A database is a collection of tables, with related data.

Table

  • A table is a matrix data.

  • A table in a database looks like a simple spreadsheet.

Column

  • A column (data element/field) contains data of one & the same kind.

Row

  • A row (tuple or entry or record) is a group of related data.

Redundancy

  • Storing data twice, redundantly to make the system faster.

Primary Key

  • A primary key is unique.

  • A key value cannot occur twice in one table.

  • With a key, you can only find one row.

Foreign Key

  • A foreign key is a linking pin between two tables.

Compound Key

  • A compound / composite key is a key that consists of multiple columns.

  • Because one column is not sufficiently unique.

Index

  • An index in a database resembles an index at the back of a book.

Referential Integrity

  • Referential Integrity makes sure that a foreign key value always points to an existing row.

Database Normalization

  • It is the process to store database data very efficiently.

  • No need to store same data more than one time and reduce the Data redundancy.

Different Types of relationships

  • One to one, One to many, Many to one

  • One to one: Merging for two table.

  • One to many: Create a foreign key from a parent table to the child table.

  • Many to many: Create a new relation table.

Why RDBMS

  • Unlike flat-file, several tables can be stored in a single database.

  • RDBMS supports client-server architecture.

  • It is designed to handle large amount of data.

  • It supports multiple users.

bottom of page