Hey there š
Hope you are doing well š
In the last blog as I have promised that I'll be starting a 7 days SQL series so here it is. In this blog we will discuss the basic introduction to SQL and database and tabular/relational and non relational database management systems.
So let's get started š„
What is Data?
Data is a collection of facts and figures or more specifically information that is gathered by observations, measurements, research or analysis.
What is Database?
Now we need something where we can store our data and can easily manipulate and retrieve it. So here comes Database in picture.
A Database is a systematically organized collection of data stored electronically in a computer system. It allows for efficient storage, manipulation, and retrieval of data as needed. Databases are managed using software called a Database Management System (DBMS).
Types of Database Management Systems
The Database Management Systems are classified into two main types -:
Relational DBMS
Non relational DBMS
Relational DBMS
Relational DBMS or RDBMS stores data in tables with rows and columns and it requires a predefined schema that defines the structure of the data (e.g., data types, constraints). It ensures data integrity and reliability through ACID -:
Atomicity: Transactions are all-or-nothing.This ensures the data operation will complete either with success or with failure.For example, a transaction will either be committed or will abort.
Consistency: Ensures data validity.If we perform any operation over the data, its value before and after the operation should be preserved. For example, the account balance before and after the transaction should be correct, i.e., it should remain conserved.
Isolation: Concurrent transactions do not interfere.There can be concurrent users for accessing data at the same time from the database. Thus, isolation between the data should remain isolated. For example, when multiple transactions occur at the same time, one transaction effects should not be visible to the other transactions in the database.
Durability: Data changes persist after transactions.It ensures that once it completes the operation and commits the data, data changes should remain permanent.
Non Relational Database Management System
Non Relational DBMS or NoSql Database does not follow the traditional table-based relational model. It is designed for flexible, unstructured, or semi-structured data.
Now that we know that what data, database, types of database and DBMS actually is, there arises a question that how exaclty the data is managed š¤?
So to answer this question we need to understand SQL.
Introduction to SQL
SQL is a standard language for accessing and manipulating databases.
SQL stands for Structured Query Language that is used to access and manipulate Relational Database.
SQL was primarily designed for managing Relational Databases.
It was developed by IBM Computer Scientists in the 1970s.
It consists of different queries that can be used to create, insert, delete and change data.
SQL is one of the widely used languages for tabular data. Even if you are someone who aspires to be an ML engineer SQL plays a very significant role.
Features of SQL
Data Definition Language (DDL) -: SQL allows you to define the structure of a database using commands.
Data Manipulation (DML) -: SQL enables inserting, updating, deleting, and retrieving data using its commands.
Transaction Control (TCL) -: SQL supports transactions to ensure data integrity. We can easily save or undo changes in transactions.
Data Control (DCL) -: SQL includes commands to manage user permissions.
Standardized -: SQL is standardized by ANSI and ISO, ensuring compatibility across different relational database systems (e.g., MySQL, PostgreSQL, SQL Server).
Scalability -: SQL works well with databases of any size, from small projects to enterprise-level systems.
Integration with Programming -: SQL can be integrated with programming languages (e.g., Python, Java, C#) to create dynamic applications.
In conclusion SQL is basically a language used to manipulate RDBMS. Now in the next blog we will see some basic commands of SQL.
I hope you have enjoyed this blog. Please leave a ā¤ and if I have missed something or you have doubts we can discuss them in comments.
Thankyou š
Top comments (1)
great sharing...