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?
β 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
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.
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
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
β¬ 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
β¬ 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.
β¬ 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
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.
β¬ 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
β¬ 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
β― 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.
β¬ 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.
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.
β¬ 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.
β¬ 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.
β¬ 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.
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...