SQL Tutorial Tips

This tutorial gives you for learning on Structured Query Language and it helps you to perform on SQL commands which provide instant result.


SQL is a language for database; SQL stands for Structured Query Language; it is used for storing, retrieving and manipulating data in relational databases.

SQL Language/Commands

SQL Language/commands are used to perform various functions. These functions include building database objects, manipulating objects, loading data to database tables, updating existing data in tables, deleting data, performing database queries, controlling database access, and overall database administration.

SQL Server Architecture

SQL Server Architecture is built with the following major components.
1.     The Network Interface Layer
2.     Relational Engine
3.     Storage Engine and
4.     SQL OS

SQL Processing Architecture

SQL Processing Architecture represents how Microsoft SQL Server queries are processed on the client, how the various clients interact with SQL Server, and what SQL Server does to process clients' requests. The high-level diagram is given below. Let’s understand more details on this topic, refer the following link.

The Optimizer will try to find the most efficient way/plan to execute the query based on available information such as table Index and scanning mechanism.

The Query execution default order is

1.     FROM clause

2.     WHERE clause

3.     GROUP BY clause

4.     HAVING clause

5.     SELECT clause

6.     ORDER BY clause


RDBMS stands for Relational Database Management System; it is a database management system (DBMS) that is called RDBMS that is supported by E. F. Codd rules. (https://en.wikipedia.org/wiki/Codd%27s_12_rules)


Table (entity) is a collection of related data entries and it consists of columns and rows.
Example: Employee, Department..,


An attribute is a specification that defined a property an object, element, or file. An attribute of an object usually consists of a name and a value; of an element, a type or class name; of a file, a name and extension.

Example: EmployeeName, EmployeeAge, DepartmentName, ..,


A field is an attribute of a table that is designed for specific information about each record/row in the table.

Example: EmployeeName, EmployeeAge, DepartmentName, ..,


A column is a field in a table that maintains specific field information about each record/row in the table.

Example: EmployeeName, EmployeeAge, DepartmentName ..,


Row is also called as a record or tuples of a table.

Data Type

A data type in a programming language is a set of data with values having predefined characteristics.

Examples: integer, floating point unit number, character, string, and binary etc..,


NULL value is a field with no value (Unknown data, OR Not applicable OR Data not given)


An Index is a data structure that improves the speed/fast of data retrieval on a database table.


A View in SQL is a logical subset of data from one or more tables.


 A Synonym is an alias for a database object (table, view, procedure, function, etc..,)


A Cursor is a database objects to retrieve data from a result set one row at a time. 

Stored Procedure

A Stored Procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs.


A Function is same as a stored procedure that must return a value.


A Trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server.


Constraints are the rules enforced on data columns on a table which ensures the accuracy and reliability/maintain the integrity of the data in the database.


Integrity ensures the accuracy and reliability of the data in the database


Database normalization, or normalization, is the process of organizing the columns (attributes) and tables (relations) of a relational database to reduce data redundancy and improve data integrity.

Entity Relationship Model

Entity Relationship Model is a logical relationship of entities (or objects) in order to create a database.

Entity Relationship Diagram (ER Diagram) 

Entity Relationship Diagram is a graphical representation of logical relationship among entities (tables) in the database.


No comments:

Post a Comment