Structure query Language and It's sub languages: DDL,DML and DCL.

 


Structure query Language (SQL)

 ➢ SQL stands for Structured Query language, pronounced as “S-Q-L” or sometimes as “SeeQuel”… Relational databases like MySQL Database, Oracle, MS SQL Server, Sybase, etc. use ANSI SQL.

 ➢ SQL is the standard language for dealing with Relational Databases. SQL can be used to insert, search, update, and delete database records. SQL can do lots of other operations, including optimizing and maintenance of database.

 SQL is made of three sub languages: DDL, DML and DCL 

1. DDL (Data Definition Language)

DDL is used by the database designer and programmers to specify the content and the structure of table. It is used to define the physical characteristics of record. It includes commands that manipulate the structure of object such as tables.

 Data Definition Language helps you to define the database structure or schema. Let’s learn about DDL commands with syntax.

 a) CREATE statement: CREATE statements is used to define the database structure schema: Syntax: CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,....]); For example: 

  1.  Create database university; 
  2.  Create table students;
  3.  Create view for students;

 For eg, to create table 

Syntax: 

CREATE TABLE table name (field_name1 data_type1 field_name2 data_type2 ………);

 CREATE TABLE Student (SN Number Fname text);

 b) Drop statement: Drops commands remove tables and databases from RDBMS 

c) Syntax: Drop table 

2) DML (Data Manipulation Language)

 DML is related with manipulation of records such as retrieval, sorting, display and deletion of records or data. It helps user to use query and display report of the table. It provide technique for processing the database. It includes commands like insert, delete, select, and update to manipulate the information stored in the database.

 Syntax: 

INSERT INTO table_name VALUES (list of values); 

INSERT INTO student VALUES (1 RAM);

 3) DCL (Data Control Language) 

All provides additional feature for security of table and database. It includes commands for controlling data and access to the database. Some of the example of this command are grant, commit, etc.

DBA (Database Administrator)

DBA is the most responsible person in an organization with sound knowledge of DBMS. He/she is the overall administrator of the program. He/she has the maximum amount of privileges for accessing database and defining the role of the employee which use the system. The main goal of DBA is to keep the database server up to date, secure and provide information to the user on demand. 

Qualities of good DBA 

  1.  He/she should have sound and complete knowledge about DBMS and its operation. 
  2.  He/she should be familiar with several DBMS packages such as MS Access, MY SQL, Oracle etc.
  3.  He/she should have depth knowledge about the OS in which database server is running. 
  4.  He/she should have good understanding of network architecture.
  5.  He/she should hove good database designing skill. 

Responsibilities 

  1. DBA has responsibility to install, monitor, and upgrade database server.
  2. He/she should has responsibility to maintain database security by creating backup for recovery.
  3. He/she has responsibility to conduct training on the uses of database. 
  4. DBA defines user privilege, relationships and manages form, reports in database. 


 Frequently Asked Question (practice time)

1) Define DBMS. List out objectives of DBMS.

2) What is relational database model? List out the advantage of this model. 

3) Differentiate between DBMS and RDBMS with example.

4) Describe the centralized and distributed database model with figure.

5) What is hierarchical database model? list out its advantage and disadvantage. 

6) What is normalization? Explain the normalization process with example. 




Author Spotlight

Santosh Chapagain
Gmail: chapagainsantoshcs@gmail.com
Phone no: +977-9863512955

Post a Comment

1 Comments