Relational Database
The importance of databases in web applications is immense. Any good application needs a database. However, databases are plentiful and relational databases are usually used more. Some popular databases such as MySQL, Oracle, PostgreSQL, etc. Data can be stored in a database and sorted by the query (as needed).
WebcoachBD's SQL tutorial will show you how to make different queries in a database. SQL has hundreds of functions, rules. These can be used to perform complex queries in the database. Even the results of any mathematical operation can be seen by processing the data.
SQL
SQL = Structured Query Language is a powerful language for managing relational databases. With this language, you can manage and access the data of any database system such as MySQL, SQL Server, Oracle, etc. It is a 4th generation language. However, it is not a full-fledged programming language because it does not support data structures such as loop, branch.
What can be done with SQL (MySQL)?
A new database can be created
New tables can be created
Query can be done
Data can be retrieved from the database
New records can be inserted into the database
Records can be updated
Can be deleted etc.
Ex:
SELECT name, email FROM users WHERE salary > 40000;
SQL Statement
Most of the work in the database can be done with the sequel statement. For example, with the following sequel, all the records in the friends table will be selected.
SELECT*FROM friends
Esquel but not case sensitive i.e. ‘select * from friends’ and ‘SELECT * FROM friends’ will both have the same function and output.
SQL can be divided into two ways
DDL-Data Definition Language: It is used to create databases, delete, etc. Index (keys) are added, connections are made between two tables, constraints are fixed in the table, etc .. Important DDL statements are
CREATE DATABASE - A new database is created
ALTER DATABASE- The database is executed
CREATE TABLE - A new table is created
ALTER TABLE- The table is edited
CREATE INDEX- INDEX is created
DROP INDEX- INDEX is deleted
DML-Data Manipulation Language:
Query and update is done with the DML part of SQL.
SELECT - retrieves data from the database
UPDATE- Updates the data
DELETE- Deletes data from database
INSERT INTO - Inserts information into the database
Top comments (0)