Introduction:-
SQL - Structured Query Language (DataBase)
Database is collection of data
Structured Query Language(Sql) is commonly used for CRUD operations-Create/Read/Update/Delete on a Database.
Database Management System (DBMS)is a Software interface between database and end user .
It's responsible for authentication,concurrency,logging,backup, optimization etc.,
TYPES OF DATABASE:
Relational
Hierarchical
Network
NonSQL(NonTable Format)
EXAMPLES OF RDBMS:-
MySQL-Open Source
SQL Server-Microsoft
Oracle-IBM
PostgreSQL-OpenSource
How to install MySQL:
Search on google -MySQL download
MySQL Installer for Windows
Follow these steps as above images to instal MySQL ☝🏻
DATA TYPES:
Character Data
Text Data
Numeric Data
Temporal Data
Character DataType:-
char-eg:char(5) stores fixed length string of length 5. Max 255 bytes.
varchar-eg: varchar(5) stores variable length of length 5. Max 65535 bytes .
1st Query:-
SHOW CHARACTER SET; --shows various character sets that are supported .
/* sql is not case sensitive.Every query Ends with semicolon.*/
latin1 is the default character set. We can also choose a specific character set like below,
varchar(10) character set utf8 --the particular column is set utf8
create database foregin_sales character set utf8; -- entire database is set to utf8.
2.Text DataType:-
All images in the section are from Learning SQL by Alan Beaulieu
BLOB-Binary Large Object File:-
Tiny Blob
Blob
Medium Blob
Ling Blob
3 . Numeric DataType:-
Whole Numbers:-
Tinyint is used to store Bool or Boolean
Decimal Numbers:-
Temporal Data:-
Thanks for reading. Hope it will be useful to you. I will post some basic SQL queries in my next Blog.
Comments