SQL FUNDAMENTALS
What is Database ?
A database is a structured collection of data that is organized in a way that
allows for easy access, management, and updating.
A database organizes data into structured formats so it can be easily accessed,
managed, and updated. Think of it as a digital filing cabinet where information
is stored systematically.
Ittypically stores data in tables that are linked together by relationships. Each
table consists of rows (records) and columns (fields), which helps in efficiently
retrieving and manipulating the data.
Example – Simple Customer
Database
Imagine a small business that wants to keep track of its customers.
Here’s how a basic customer database might be structured:
Tables: The database is organized into tables. Each table
represents a different entity (e.g., Customers, Orders).
Columns: Each table has columns, which define the attributes or
fields of the entity (e.g., Name, Address, Phone Number).
Rows: Each row in a table represents a single record (e.g., details
of one customer).
Example – Simple Customer
Database
DATABASE MANAGEMENT SYSTEM
Database management system is a software which is used to
manage the database.
For example: MySQL, Oracle, etc. are a very popular commercial
database which is used in different applications.
DBMS provides an interface to perform various operations like
database creation, storing data in it, updating data, creating a table
in the database and a lot more.
It provides protection and security to the database. In the case of
multiple users, it also maintains data consistency.
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Database Types
Database Types
RELATIONAL DATABASE
Arelational database (RDB) is a method of organizing data into
tables, rows, and columns to show relationships between data
points.
This structure makes it straightforward to access, create, read,
modify, and delete data using a querying language such as SQL.
RELATIONAL DATABASE
NOSQL DATABASE
NoSQL databases were developed as an alternative to traditional SQL databases,
NoSQL databases are especially useful when working with large or fast-moving data
that may not fit neatly into a table.
They accomplish this by relaxing some of the data consistency restrictions found in
relational databases, making them ideal for dynamic, high-performance applications
that require scalability and speed.
Instead of tables, NoSQL databases use more flexible data models, such as key-value
pairs, documents, or graphs.
They offer scalability and flexibility, making them suitable for handling large amounts
of unstructured or semi-structured data.
Examples include MongoDB, CouchBase, Cassandra, and Redis.
NOSQL DATABASE
RELATIONAL DATABASE vs NOSQL
DATABASE
RELATIONAL DATABASE vs NOSQL
DATABASE
SQL
SQL stands for Structured Query Language. SQL is a computer language used to interact
with relational database systems.
SQL is a tool for organizing, managing, and retrieving archived data from a computer
database. When data needs to be retrieved from a database, SQL is used to make the
request.
The DBMS processes the SQL query retrieves the requested data and returns it to us.
Rather, SQL statements describe how a collection of data should be organized or what
data should be extracted or added to the database.
Structured Query Language
SQL is a computer language used to interact with relational database systems.
SQL is a tool for organizing, managing, and retrieving archived data from a computer
database. When data needs to be retrieved from a database, SQL is used to make the
request.
The DBMS processes the SQL query retrieves the requested data and returns it to us.
Rather, SQL statements describe how a collection of data should be organized or what data
should be extracted or added to the database.
Structured Query Language
SQL is a computer language used to interact with relational database systems.
SQL is a tool for organizing, managing, and retrieving archived data from a computer
database. When data needs to be retrieved from a database, SQL is used to make the
request.
The DBMS processes the SQL query retrieves the requested data and returns it to us.
Rather, SQL statements describe how a collection of data should be organized or what data
should be extracted or added to the database.
MYSQL
MySQL is currently the most popular database management system
software used for managing the relational database.
It is open-source database software, which is supported by Oracle
Company. It is fast, scalable, and easy to use database management
system in comparison with Microsoft SQL Server and Oracle Database.
It is commonly used in conjunction with PHP scripts for creating powerful
and dynamic server-side or web-based enterprise applications.
It is developed, marketed, and supported by MySQL AB, a Swedish
company, and written in C programming language and C++ programming
language.
MySQL supports many Operating Systems like Windows, Linux, MacOS, etc.
with C, C++, and Java languages.