Hello, welcome to my blog again. In this series, I will be writing about databases. 🚀🚀🚀🚀
Introdaction of SQL
- SQL is a standard query language for storing, manipulating, and retrieving data in a database.
Things that SQL can do
CRUD (Create, Read, Update and Delete)
- Create
- can create a database
- create new tables in a database
- insert records in a database
- can create stored procedures in a database.
Read
- read data from the database
Update
- update records in a database
Delete
- delete records from a database
run/execute queries against a database
RDMS
- RDMS stands for relational database management system .
- data in RDBMS is stored in database objects called tables.
- A table is a collection of related data entries and it consists of col and rows or fields and records.
SQL Rules
- SQL is not case sensitive: select and SELECT are the same.
- semicolon: is the standard way to separate each SQL statement in database systems that contains more than one statement to be executed in the same call to the server.
Common commands in SQL and what they do
command | what it does |
Select | reads data from a database |
Update | update data in a database |
Delete | deletes data from a database |
Insert into | inserts a new data into DB |
Create database | creates new DB |
Alter table | modifies a table |
Drop table | deletes a table |
Create index | creates an index(search key) |
Drop index | deletes an index |