Structured Query Language: Data: Attributes Entity. Object
Structured Query Language: Data: Attributes Entity. Object
Structured:
Who follows syntax -> set of rules
Query:
Request
Language:
Medium to communicate.
Database:
Is a place where we can store the data in a
systematic/organised manner.
Data
Data Base
Basic Operation performed by the Data Base is:
CRUD operation.
Create/Insert.
Read/Retrieve.
Update/Modify.
Delete/Drop.
DATABASE
System
Files
format
DBMS
QL
Features:
Security
Authorization.
Drawbacks:
Wastage of Memory.
Fetching time is slow.
DATABASE
Relational Database Management System [RDBMS]:
It is a DBMS software which follows relational model to
manage and maintain the database.
Here the data stored in Table format.
To interact with the database, we used SQL.
DBMS
QL
Features:
1. Security.
2. Authorization.
Tables:
It is a combination of rows and column.
Cell:
It is a smallest unit of a table.
Row/Tuple/Record
Cell
Column/Attribute/Fields
Rules of E. F. Codd:
1. Every Cell have must have single value data.
2. In RDBMS we store everything in the form of table,
including metadata.
Datatype:
It is used to determine what type/kind of data will be stored in
a particular memory location.
Datatypes in SQL:
1. CHAR
2. VARCHAR / VARCHAR2
3. NUMBER
4. DATA
5. LARGE OBJECT(LOB)
1. Character LOB (CLOB).
2. Binary LOB (BLOB).
Note:
SQL is not case sensitive.
CHAR Datatype:
Char datatype use character such as
‘A-Z’, ‘a-z’, ’0-9’, special character (*, @, #, --).
Syntax:
Char(size)
Whenever we mention char datatype, we have to mention
size for it.
Max size = 2000;
It is a type of fixed memory allocation.
Wastage of memory due to unused memory to overcome
it we have VARCHAR.
VARCHAR Datatype:
Varchar datatype use character such as
‘A-Z’, ‘a-z’, ’0-9’, special character (*, @, #, --).
Syntax:
varchar(size)
Whenever we mention varchar datatype, we have to
mention size for it.
Max size = 2000;
It is a type of “Variable length memory allocation”.
There is no wastage of memory in varchar.