• SkillEnable

Introduction to SQL

Full form- Structured Query Language (SQL)

SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce after learning about the relational model in the early 1970s. This version was first named as SEQUEL (Structured English Query Language). It was designed to compress and edit data stored in IBM's original quasi-relational database management system, System R. Now SQL is one of the top programming languages. It is now an ‘evolving landscape’.

What is SQL?

Structured Query Language, also known as SQL, is a programming language for relational databases. This language is used to share and manage data, especially relational databases. This database includes data organized into tables and files. Using SQL, you can query, update, and manipulate data, as well as create and modify the schema (structure) of that data system and control it.

Therefore SQL offers variety of numerical data types to suit different purpose.

Features of SQL

High Performance

SQL has a very high performance programming capability for a highly transactional, heavy workload and high usage database system. SQL programming gives various ways to describe the data more analytically.

High Availability

SQL is compatible with databases like MS Access, Microsoft SQL Server, MySQL, Oracle Database, SAP HANA, SAP Adaptive Server, etc. All of these relational database management systems support SQL and it is easy to create an application extension for procedural programming and various other functions which are additional features thus converting SQL into a powerful tool.

Scalability and Flexibility

SQL provides Scalability and Flexibility. It is very easy to create new tables and previously created or not used tables can be dropped or deleted in a database.

Robust Transactional Support

SQL programming can handle large records and manage numerous transactions.

Comprehensive Application Development

SQL is used by many programmers to program apps to access a database. No matter what the size of the organization, SQL works for every small or large organization.

Open Source

SQL is an open-source programming language for building relational database management systems.

Types of SQL command

SQL Categorizes its commands on the basis of functionalities performed by them. There are five types of SQL Commands which can be classified as:

DDL(Data Definition Language)- In order to make/perform changes on the physical structure of any table residing inside a database, DDL is used. These commands when executed are autocommit in nature and all the changes in the table are reflected and saved immediately.

DML(Data Manipulation Language)- Once the tables are created and the database is generated using DDL commands, manipulation inside those tables and databases is done using DML commands. The advantage of using DML commands is, if in case any wrong changes or values are made, they can be changed and rolled back easily.

DQL(Data Query Language)- DCL commands as the name suggests manages the matters and issues related to the data control in any database. TCL commands mainly provide special privilege access to users and are also used to specify the roles of users accordingly.

DCL(Data Control Language)-Data query language consists of only one command over which data selection in SQL relies. SELECT command in combination with other SQL clauses is used to retrieve and fetch data from database/tables on the basis of certain conditions applied by the user.

TCL(Transaction Control Language)- Transaction Control Language as the name suggests manages the issues and matters related to the transactions in any database. They are used to rollback or commit the changes in the database.

SQL Functions

  • Scalar Functions

SQL scalar functions return a single value, based on the input value.

Useful scalar functions:

UCASE() - Converts a field to upper case

LCASE() - Converts a field to lower case

MID() - Extract characters from a text field

LEN() - Returns the length of a text field

ROUND() - Rounds a numeric field to the number of decimals specified

NOW() - Returns the current system date and time

FORMAT() - Formats how a field is to be displayed

  • Aggregate Functions

SQL aggregate functions return a single value, calculated from values in a column.

Useful aggregate functions:

AVG() - Returns the average value

COUNT() - Returns the number of rows

FIRST() - Returns the first value

LAST() - Returns the last value

MAX() - Returns the largest value

MIN() - Returns the smallest value

SUM() - Returns the sum

Over 70% of the employment listings for web developers, data scientists, data analysts etc on a major job hunting website have SQL as their ‘basic’ requirement. Not having this skill would shrink your chances of finding that perfect job in the fastest growing industries.

SQL is considered to be the most universal and easiest to master. It is a power pack when it come to calculating and manipulating the database. It is considered to be one of the top 4 tools in today's industry!

To know more about relevant tools stay tuned!

69 views0 comments

Recent Posts

See All