Relational databases are used for storing and organizing data in a way that can be easily accessed, updated, and queried. They consist of tables. A table is a set of data values that are organized in columns and rows. The cells are where the rows and columns intersect.
The relational model is a data model for storing and retrieving information. It is the most widely used database model in the world, with over 90% of commercial databases using it. The term “relational” refers to how data in tables are related to one another through common field names and similar rows structure. Relational databases are made up of relations that consist of columns (or attributes) and rows (also called tuples or records).
In the relational database model, each piece of data is stored in a row (or record) and columns (or fields). Each row is linked to other rows via unique IDs. This eliminates duplication of data. The database performs automatic work here: if the ID changes at any time (e.g., due to updating), then the link will be updated accordingly.
|ID||Product Name||Weight (g)||Pack|
Terminologies Used in Relational Model
- Tables – The relational model uses the table format to save relationships. Each table has two properties: rows and columns. Rows represent records, while columns represent attributes.
- Tuple – A single row in a table contains the record and is called tuple.
- Cardinality: Number of rows (tuples) of the table is called cardinality.
- Attribute -A column in the table is called attribute. These are the properties define relation.
- Degree: Number of attributes in the table is called degree.
- Relation Schema: A relation schema represents the name, attributes and cardinality of a single relationship between two or more entities.
- Relation instance – Relation instance is a finite set of tuples in the RDBMS system. Relation instances never have duplicate tuples.
- Relation key – Every row has one, two or multiple attributes, which is called relation key.
- Attribute domain – Every attribute has some pre-defined value and scope which is known as attribute domain
The basic structure consists of:
Attributes can be either single-valued or multi-valued, while values correspond to specific objects like strings or integers. Relationships between different entities can be represented as links where each link has its own unique identifier number called a primary key which enables retrieval from other
One example from this relational model would be an email address table where each row contains contact information such as name, company address etc., just like you might find on your computer desktop’s contacts list applet (the ones usually found at top right). You can also think about any spreadsheet document which has multiple cells separated by column headers: there are many ways these could represent different types of individuals who
The relational model, or RM for short, represents the database as a collection of related tables. The columns in these tables denote entities and their relationships to one another. For example: House has-a Street will be represented by two rows – one representing the “House” entity with three values (name=house), streetName=”Street”, address=”123 Main St.”) and other row defining an instance of its relationship to Street(“has-a”)with value (“street”).
Operations performed in Relational Model
In the relational model, four types of operations are performed.
- Insert Operation: Insert Operation is used to save the values in a new tuple.
- Modify/Update Operation: Modify operation updates (changes) the existing values in a tuple.
- Search Operation: We retrieve information.
- Delete Operation: Used to delete the tuples.
Why is it called a relational database?
The data is stored in a structured format i.e. in columns and rows. In this type of storage, we can easily access the values. It is called a relational database because the values within the same table are closely related to each other. Tables within the database can also be related to each other. We can run different queries to fetch data or some specific value from multiple tables.
What is the difference between database and relational database?
In the database, the data is stored in a file while in a relational database the data is stored in the form of tables and rows. Unlike the database, we can fetch multiple data items in a relational database.
Database, usually, have a small quantity of data while relational database can deal with large amounts of data.
List of popular relational database
A number of relational database software are available in the market. We have listed some popular ones.
- Microsoft SQL
- Oracle Database
- IBM Db2
- Amazon Relational Database Service (RDs)
- Amazon Aurora
- Azure SQL Database
- SAP SQL Anywhere
You can see the worldwide popularity of relational databases here.
Is Python a relational database?
No, Python is an interpreted programming language. Python isn’t a relational database, but it’s very good at extracting information from them. Pandas library (or some other library) is used to connect the python to a relational database for analysis purpose.
- Relational Database Benefits and Limitations
- 9 Types of Databases
- Distributed Database
- Personal Database
- Centralized Database