Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Login or Register to Hide ads and Accessing all features on the forum


What is SQL??

0 Replies, 15075 Views

In The Name OF Allah
Al-Salam Alekum


Hello guys, I came back to you with a new tutorial, I will try to explain SQL for you. What is SQL and its benefit. Big Grin

What is SQL??
SQL stand for Structured Query Language is a set of instruction used to communicate with Database. When you are using a program which is using Database for storing data, you are giving instruction by clicking on buttons like (Add, Delete, Insert, Search ...etc). by itself the program translates your commands into a SQL statement that the database knows how to interpret.

What is Data??
Data is a set of values for qualitative or quantitative variables. It can be character, a word or a statement. For example (My username here on the forum @Mr.Kurd is Data).

What is Database??
A database is an organized collection of data, stored and accessed, it makes collecting easy and has ability for manipulation and updating.

Okay, I think you have an idea now what are we talking about Big Grin . mhm We will face another term Database Management System (DBMS).

What is Database Management System (DBMS)
DBMS is a collection of programs for managing data and simultaneously it support different types of users to create, manage, retrieve, update and store information. The most common type of DBMS is Relational database management systems (RDBMS’s).

What is our new boy  Dodgy  RDBMS??
A relational database management system (RDBMS) is a program that allows you to create, update, and administer a relational database. Most relational database management systems use the SQL language to access the database. yey we used SQL word again for second time.

I think we have to talk about another term here? Which one? mhm you took a lot of time. Don't worry am telling you now  Tongue  it is relational database

What is RDB(Relational Database)??
RDB is a type of Databases, In simplest terms, a relational database is one that presents information in tables with rows and columns.

Well we are good to go now Dodgy  Aren't we? Wink

Popular Relational DBMS
  1. SQL Server
  2. MySQL
  3. Oracle
  4. PostgreSQL
  5. IBM Db2
Why we need to talk about these terms? We really wouldn't need it if you knew that before Punsh  Smoker . SQL is the standard language for dealing with Relational Databases and gives you or has ability to insert, search, update, delete database records.

Let's focus on SQL now. There is a set of basic SQL commands that is considered standard and is used by all RDBMSs. all of them are using SELECTE  statement. Example of SQL statements and RDB database:

We have a table consist of 4 Columns and 3 Rows shown below:

PHP Code:
Num. | Name         Age  Sex
Kurdy        |  40  Male 
Miss4ulove  |  22  Female
Virus        |  32  Male 

SELECT statement used to get information from the Database. Am gonna make a test Database on my Local MySQL server and with help of phpmyadmin is a free and open source administration tool for MySQL and MariaDB.


First example for SELECT statement is getting whole data from our database inside the users table:

SELECT * FROM `users`

I got everything:

Second getting just the Name column of users:
SELECT `Name` FROM `users`

If you want to get all column we will use just a * symbol for selecting all columns but if you want select one of them you are gonna write down the name of the column the example above we got all data which below to Name column. We can select more than one column this way:
SELECT `Num.`,`Name` FROM `users`

Let us get one row this time. We are having three Rows we will chose first Row Number one.

SELECT * FROM users WHERE `Num.`=1
In this example we got the row which Num. equals to 1:

Another example getting the Row by users name:

SELECT * FROM users WHERE `Name`='virus'

I think I gave you the idea, I will try explain some of other SQL statements in my next tutorial Wink
Finally if you have any question feel free asking and am sorry for any grammatically errors Dodgy   

Wa Salam Alekum Heart
* Thankful to Allah *
(This post was last modified: 03-22-2019, 11:58 AM by Mr.Kurd.)

Messages In This Thread
What is SQL?? - by Mr.Kurd - 03-22-2019, 11:54 AM

Users browsing this thread: 1 Guest(s)