Swapna Kumar Panda
Swapna Kumar Panda

@swapnakpanda

19 Tweets 7 reads Feb 07, 2023
An introduction to SQL: a beginner's guide
πŸ—’οΈ Table of content
➊ What is Data?
βž‹ Role of data in a program
➌ Data categories
➍ What is a Database?
➎ Database Model
➏ What is DBMS?
➐ DBMS categories
βž‘ What is a Relational Database?
βž’ What is SQL?
βž“ Need for SQL
➊ What is Data?
Data are
❯ individual facts
❯ statistics
❯ items of information
βž‹ Role of data in a program
All the programs can be divided into two major parts.
➀ Code (or algorithms)
➀ Data
The code in a program is static. But data is dynamic. Hence the runtime behavior of a program is largely dependent on data.
➌ Data categories
Data can be broadly categorized into 3 categories based on its format.
➀ Structured
➀ Unstructured
➀ Semi-Structured
➌.βž€ Structured Data
⬘ Structured Data aka "Quantitative Data" is the data which
❯ has a well-defined structure
❯ conforms to a data model
❯ can be easily accessed and, used
β¬— Structured data accounts for only about 20% of data.
⬙ Examples: Name, Address
➌.➁ Unstructured Data
⬘ Unstructured Data aka "Qualitative Data" is the data which
❯ does not have any predefined data model
❯ cannot be processed by conventional tools
β¬— Unstructured data accounts for about 80% of data.
⬙ Examples: Text Files, Audio/Videos
➌.βž‚ Semi-structured Data
⬘ Semi-structured data is the β€œbridge” between structured and unstructured data.
β¬— It does not have a predefined data model and is more complex than structured data, yet easier to store than unstructured data.
⬙ Mostly in JSON/XML/CSV formats.
➍ What is a Database?
A database is
❝an organized collection of data❞
❯ stored in a computer system so that
❯ it can be easily accessed and managed
➎ Database Model
⬘ A database model is a data model that determines the logical structure of a database.
β¬— It fundamentally determines how data can be stored, organized, and manipulated.
⬙ One popular database model is the relational model, which uses a table-based format.
➏ What is DBMS?
⬘ DBMS stands for Database Management System.
β¬— DBMS is the software that is used to manage a database (whereas a database is for storage).
⬙ A DBMS interacts with
❯ end users
❯ applications
❯ database
β¬– A DBMS would typically take care of
❯ AuthN & AuthZ
❯ Create, Modify, Delete a Database
❯ Create, Modify, Delete Database Objects
❯ Create, Modify, Delete Data
❯ Query Data
❯ Handle transactions
➐ DBMS categories
⬘ Broadly DBMS are categorized into
➀ Relational DBMS (RDBMS)
➀ NoSQL
β¬— RDBMS handles relational models and manages structured data.
⬙ NoSQL comes with various database models and manages both unstructured and semi-structured data.
βž‘ What is a Relational Database?
A relational database is a
❝collection of data items❞
that have some
❝pre-defined relationships❞
between them.
⬘ These items are organized as a set of "Tables" with "Columns" and "Rows".
⬙ A relationship between 2 tables is established based on one or multiple similar columns.
βž’ What is SQL?
⬘ SQL stands for Structured Query Language.
β¬— SQL is a computer language for storing, manipulating, and retrieving data in a relational database.
⬙ SQL provides useful commands for performing these operations.
βž“ Need for SQL
⬘ Because of its popularity, multiple vendors started their own implementations of relational databases.
⬙ The need to develop one common language for managing both data and structures became necessary.
Further read: Different components of SQL
That's a wrap. Did this thread give you a basic idea about databases and SQL?
I am a tech educator and writer, here sharing beginner-friendly content on SQL, Python, JavaScript, and DSA. Follow me (@swapnakpanda) to never miss any of those.

Loading suggestions...