0% found this document useful (0 votes)
41 views

Module - 2 - Database Languages - DDL

Uploaded by

Kiran Ramesh
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Module - 2 - Database Languages - DDL

Uploaded by

Kiran Ramesh
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Database Languages:

A database system provides a data definition language(DDL) to specify the database


structure and a data manipulation language(DML) to express database queries and
updates.
• DDL
Set of SQL commands used to create, modify and delete database structures but not
data. These commands are not normally used by a general use who should be accessing
the database via an application. They are normally used the DBA to a limited extent, a
database designer, or application developer.
Example: To create objects in the database- create table account(acc_no
varchar(45),balance varchar(4));
Alter: Alter the structure of the database.
Drop: Delete objects from the database
• DML – Enables users to access or manipulate data in database.
• Retrieval of information stored in the database
• Insertion of new information into the database
• Deletion of information from the database
• Modification of information stored in the database
•,
• 
• Insert: Insert data into a table
• Example:insert into account values(‘A001’,’1000’);
• Update: Update existing data within a table
• Delete: deletes all records from a table
• Query: A query is a statement requesting the retrieval of information.
• Ex: select * from account;

• TCL
• Commit – save all the transaction.
• Rollback – Go back to last transaction . like undo in MS word.
• Truncate- Removes all records from a table, including all space
allocated for the records are removed.
DDL
• CREATE TABLE Student
•              (Reg_no varchar2(10),
•               Name char(30),
•               DOB date,
•               Address varchar2(50));
 Column name Data type  Size

 Reg_no  varchar2  10


 Name  char  30
 DOB      date
 Address  varchar2  50

You might also like