Skip to main content

Database languages in DBMS| Explain with syntax - computer science fundamentals tutorial


Relational Database Management System languages and their commands


Database languages play an important role in Relational database management system. Database languages are used to read, update and store data in database. These database languages that can be used for this purpose one of them SQL.
Types of Database languages
There are five types of database language

DDL: -Data Definition Language
DML: -Data Manipulation Language
DCL: -Data Control Language
SQL: -Structure Querying Language
TCL: -Transaction Control Language

         1)DDL(Data Definition Language):- Data Definition Language used for  specifying the data base ‘schema’. It is used for creating tables, schemas etc. in database. Commands of Data Definition Language(DDL) are given below
CREATE: - to create database instances. This commands use to create tables as follows:-
        
CRATE TABLE [name of table] ([definition of column]) [parameter of table]
                           
DROP: - to drop database instances. this command used to delete table or database and syntax is
            DROP type of object name of object

COMMENT: - to comment.

ALTER: -to alter structure of database. this command used to modify properties  of database object. the syntax is
      ALTER  type of object     name of object

2)DML(Data Manipulation Language):-  Data Manipulation Language used for accessing and manipulating data in database. 
 Commands of Data Manipulation Language (DML) are

INSERT: - to insert record(s) into the table.
 UPDATE: - to update data into table.
 DELETE: - to delete record(s) into the table.
SELECT: -to read/retrieved record(s) from table.                                                         

         3)DCL( Data Control Language): -Data Control Language used for granting and revoking user access on a database. 
        Commands of  Data  Control Language(DCL) are given below

   GRANT: - to grant access to user.
  REVOKE: - to revoke access to user.

4)TCL( Transaction Control Language):- Transaction Control Languages are used to changes in the database that we made by using DML commands either performance or role backed by using TCL.  
Commands of Transaction Control Language(TCL) are given below


COMMIT: - to persist the changes made by DML command in database.
ROLL BACK: - to roll back the changes made to the database.


Comments

Popular posts from this blog

Important MCQ of RDBMS( Relational database management system)-FCST

Important MCQ of RDBMS  1. A RDBMS consists a collection of ? a. Tables b. Fields c. Records d. Keys  ANS/- a. table 2. The term attribute refers to a ___________ of a table a. Record b. Tuple c. Column d. Key   ans/- c. Column 3. In relational model, the row of table is known to be ?  a. Relation b. Entity field c. Tuple d. Attribute  ans/- C. Tuple 4. . Address field of a person should not be part of primary key, since it is likely to ? a. Dependent b. Too long c. Changed d. Not changed  ans/- c. Changed 5. The relational model is concerned with ? a. Data structure and Data integrity b. Data Manipulation c. Both a and b d. None of these  ans/- c. Both a and b 6. Which is the false statement from the following ? a. A veiw is a named derived table b. A name relation is variable c. A veiw is a named reation and is virtual d. None of these  ans/- d. None of these 7. The union of primary key...

Short notes on database schema & database independence- computer science fundamentals tutorial

            Database Schema &  Data Independence PDF version of this post also available. to download the click the link given at the end of this post.           Database Schema : -  A database schema   is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how relat ion among them are associated.  Database schema  formulates all the constrains that are to be applied on the data. A database schema defines its entities and the relationship among them. It contains descriptive details of the database which can be described by means of schema diagram. A database schema can be divided into two categories.   I.     Physical database schema : - this schema contain to the actual storage of data and its form of storage like files, indices etc. It defines how the data will be stored in a secondary storage. ...

C program to find factorial of number using function - FCST

C program to find factorial of number using function Problem description In this program take number as input & then it show the factorial of given number as output. Problem solution 1.take a number as input. 2.declare the void Fact(int) function globally if you want or declare the function prototype  into the main() function. 3.after taking input call the function into main() . 4.then define the function definition. 5.after taking function definition for loop started in this function definition. 6. In for loop i=1 & fact=1 then fact=1. after this loop is continue and incremented by1 until the n is grater than equal to i. continuity of loop is depend on what number take as input .  Program code: #include<stdio.h> void Fact(int);//function prototype declearation int i,fact=1;//global variable declearation int main()  { int n; printf("\n enter the  number:"); scanf("%d",&n); Fact(n);//function call } //func...