Database Languages:

Now it is time to do some practical, before 8 each and everything was conceptual and logical.Now database provides two languages for describing schema and to perform queries and operation.

-> Data Definition Language :DDL

-> Data Manipulation Language: DML (combining both of them become SQL structured query language)

What Is Data Definition Language In DBMS:

Suppose you have a software for DBMS let MS SQL Server 2008 and you have installed that software. Now it is time to do practical.

Now you have to create database then create a table and define their schema. So we use DDL to do this all.

There are set of queries and setting through which we can do this.

To create a database we use this query or statement.

CREATE DATABASE AIRTEL-LTD.

This query will create the database named Airtelltd

Now it's time to create table in it.

Create Table Employee(E_Id int, E_Name varchar, E_Age int);

This query will create table named 'Employee' with attributes E_Name,E_Age, E_Id with the type of values that can store only.

***As soon as we execute this statement it updates a special set of tables called Data Dictionary or Data Directories.***

Data Dictionary:

It contains "Meta Data" i.e "data about the data".

****Now here the schema of a database with table has created with those information which we have provided.****

Data_dictionary

Storage structure and access methods[ physical schema] Used by the database system by a set of statements in a special type of DDL, called a data storage and definition language. It defines the implementation details of database schema, which are usually hidden from the user.

Now it's time to enter or insert some data to the table's attributes. But before entering data values we have to apply some constraint / rules and limitations on these values.

Example: Value in a bank account take integer value that money in an account never with negative value.

Constraint_on_amount


Facebook Likes

Youtube