SQL_DAY1&2NOTES
SQL_DAY1&2NOTES
WHAT IS SQL?
➢ SQL stands for Structured Query Language.
➢ It is used for communication with the database.
DATA
Data is a raw-fact which describes the attributes of an Entity.
Examples:
1) Person - entity
Attributes and data(in red) of a person
First name: Rohan
Surname: Singh
Phone number: 9876543210
Dob: 14-MAY-199X
Gender: MALE
2) Laptop - entity
Attributes and data (in red) of a laptop
Brand: Dell
RAM: 8gb
Touch: no
Storage: 1 TB
DATABASE :
Database is a place or a medium in which we store the data in a systematic and organized manner.
HARD DISK
a PPT in your
computer
PEN DRIVE
Software
DATA SECURITY & AUTHORISATION
DBMS SOFTWARE
Example:
➢ It is a type of DBMS software in which we store the data in the form of rows and
columns(tables).
➢ It also provides 2 important features i.e security and authorization.
➢ We use SQL to communicate or interact with RDBMS
➢ RDBMS stores the data in the form of Tables.
Software
SECURITY &
AUTHORISATION
Data
STRUCTURED
QUERY Database
LANGUAGE
RDBMS
EXAMPLE:
RELATIONAL MODEL
➢ Relational Model was designed by E.F CODD.
➢ In Relational Model we can store the data in the form of tables.
➢ Any DBMS which follows Relational Model becomes RDBMS .
➢ Any DBMS which follows rules of EF CODD becomes RDBMS .
Relational RDBMS
DBMS
Model
RULES OF EF CODD
TABLE
➢ It is a logical organization of data which consists of rows and columns.
Rows/ Cell
Records/
Tuples
Attributes of
EID ENAME SALARY employee:
RECORDS 1 SMITH 1000 EID, Ename,
OF DIFFERENT Salary
2 ALLEN 1500
EMPLOYEE
3 CLARK 2000