Posts

What is SQL?

Image
Structured Query Language (SQL) is the standard language for storing, manipulating and retrieving data in databases using special software known as Relational Database Management Systems (RDBMS). There are many RDBMS softwares available to store and manage the structured data. Some of the RDBMS softwares are MySQL, MariaDB, Oracle Database, Microsoft SQL Server, PostgreSQL, SQLite etc. SQL is case insensitive language. SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987

What SQL can do?

SQL can  perform various database operations like ·          Create and remove of database ·          Create, alter and remove the tables ·          Insert, update, delete and retrieve the records ·          Controlling the user access ·          Managing transactions during insertion, updation and deletion of records

How to install the RDBMS Software?

 Most of the RDBMS softwares are proprietary and some of them are open source. For the proprietary software like Oracle Database, Microsoft SQL Server you have to take the license to use by paying a good amount. For the open source software or community editions of the proprietary softwares, you have not to pay any amount. You can use them for learning purpose but not for commercial purpose. To learn the SQL statements, you can install MySQL Community Edition Server and Workbench software from the following links https://dev.mysql.com/downloads/mysql/ https://dev.mysql.com/downloads/workbench/ You can also refer the video, How to Install MySQL Community Edition , if getting an issue in installation process.

What are various types of SQL statements?

These SQL statements are divided into four major categories depending on their actions ·          DDL (Data Definition Language) ·          DML (Data Manipulation Language) ·          DCL (Data Control Language) ·          TCL (Transaction Control Language)   DDL is used to manage the structure of the tables. The main keywords under DDL are CREATE, ALTER and DROP. DML is used to manage the records inside the tables. The main keywords under DML are INSERT, UPDATE, DELETE and SELECT. DCL is used to manage the user access control. The main keywords under DCL are GRANT and REVOKE. TCL is used to manage the changes made by DML statements in the database. Themain keywords under TCL are COMMIT, ROLLBACK and SAVEPOINT.

How to create a database?

 To create a database you have to use the SQL statement, CREATE DATABASE with following syntax Syntax CREATE DATABASE databasename; Example CREATE DATABASE demodb;

How to make a database as current working database?

Before start working on a database, you need to select that database and need to make the current working database using the SQL statement, USE with the following syntax Syntax USE databasename; Example USE demodb;

How to plan to create a table in the database?

  A table is used to hold your records or rows related to some entity . An entity is something about which we manage some data e.g. Books in a library, Customer of an e-commerce website, User having an Instagram account, Student in a college. We need to indentify the columns or the fields to be stored while managing records of such entities e.g. Book can have columns or fields like Book Number, Title, Author and Price Book Number Title Author Price 101 Data Analytics for Beginners Rohit Kumar 400 102 Data Analytics for Professional Sanjay Sharma 500 103 Business Analytics for All Neeraj Verma 500 104 SQL Programming Dr B P Sharma 700 105 Python Programming Dr B P Sharma 900   Student can have columns ...