Introduction To SQL
What is SQL? Why SQL?
● SQL stands for Structured Query Language SQL helps to perform below tasks
● It is a query language
● It helps in manipulation and accessing database ● Execute queries against a database
● It helps to manage data in relational database ● Retrieve data from a database
management systems ● Insert records in a database
● It became the standard of ANSI in 1986 and ISO ● Update records in a database
in 1987 ● Delete records from a database
● Create database
● Create table
● Set permissions on tables
Introduction To Database
What is a database? Types of databases
● A database is an organized collection of ● Centralised Database
structured information, or data, typically stored ● Distributed Database
electronically in a computer system ● Personal Database
● A database is controlled by a DBMS (Database ● End-User Database
Management System) ● Commercial Database
● NoSQL Database
● Operational Database
● Relational Database
● Cloud Database
● Object Oriented Database
Types Of Databases
Centralised Database Distributed Database
● Data is stored at a centralised location ● Data is distributed at various locations
● Users from different locations can access the ● Connected to each other with the help of
data communication links
● Types
● Contains application procedures that help the
○ Homogenous
users to access the data even from a remote
○ Heterogenous
location ● Homogenous: All the sites use identical DBMS
● Authentication procedures are applied for the and operating systems
verification and validation of end users ● Heterogenous: All the sites use different DBMS
and operating systems
Types Of Databases
Personal Database End User Database
● Data is collected and stored on personal ● Not concerned about the operations at various
computers levels
● Small and easily manageable ● Only related to the product which may be a
● Generally used by the same department of an software or an application
organisation ● Shared database designed for end users
● Accessed by a small group of people
Types Of Databases
Commercial Database Nosql Database
● Paid version of the huge database ● Used for large sets of distributed data
● Designed for users who want to access the ● There are very efficient in analyzing large size
information for help unstructured data that may be stored at multiple
● These databases are subject specific virtual servers of the cloud
● Access is provided through commercial links
Types Of Databases
Operational Database Relational Database
● Information related to operations of an ● Made up of a set of tables with data that fits into
enterprise is stored inside this database a predefined category
● Functional lines like marketing, employee ● The Structured Query Language (SQL) is the
relations, customer service etc. require such standard user and application program interface
kind of databases for a relational database
● There are various simple operations that can be
applied over the table which makes these
databases easier to extend, join two databases
with a common relation and modify all existing
applications
Types Of Databases
Cloud Database Object Oriented Database
● Database that has been optimized or built for ● Collection of object oriented programming and
cloud environment relational database
● Benefits ● An object-oriented database is organized around
○ Ability to pay for storage capacity and objects rather than actions, and data rather than
bandwidth on a per user basis logic.
○ Provide scalability on demand ● For example, a multimedia record in a relational
database can be a definable data object, as
opposed to an alphanumeric value.
What Is A DBMS?
● DBMS serves as an interface between the database and its end users or programs
● DBMS allow users to retrieve, update, and manage how the information is organized and optimized
● DBMS also facilitates oversight and control of databases, enabling a variety of administrative operations such as
performance monitoring, tuning, and backup and recovery
API
DATABASE DBMS USER
What Is A Table, Record, Row, Column
Table
● Tables are database objects that contain all the data in a database
● In tables, data is logically organized in a row-and-column format similar to a spreadsheet
● Each row represents a unique record
● Each column represents a field in the record
Record
● A record is a collection of data relating to a single unit
Row
● A row represents a single data item in a table. It is also known as tuple
Column
● A column is a collection of cells aligned vertically in a table. It is also known as fields.