Professional Documents
Culture Documents
Dbms CT 1 4 Marks
Dbms CT 1 4 Marks
4 MARKS:
1.Differen ate between file processing system and DBMS.
Already wri en
Features of DML
Syntax :
SELECT *
ROM <table_name>;
Example :
SELECT *
FROM books;
OR
SELECT *
FROM books
where book_id=120;
Syntax :
Syntax :
UPDATE <table_name>
SET <column_name = value>
WHERE condition;
Syntax :
WHERE <condition>;
Advantages of DML
Disadvantages of DML
The a ribute(s) used for describing the rela onship is called descrip ve
a ributes, also referred as rela onship a ributes. They are actually used for
storing informa on about the rela onship. A rela onship can have zero or
more a ributes.
Let us consider an example ER diagram given below:
8.Discuss ER Model.
Wri en
9.Interpret DDL and list out the DDL commands
DDL(Data Defini on Language) : DDL or Data Defini on Language actually
consists of the SQL commands that can be used to define the database schema.
It simply deals with descrip ons of the database schema and is used to create
and modify the structure of database table in the database.
Examples of DDL commands:
• CREATE – is used to create the database or its objects (like table, index,
func on, views, store procedure and triggers).
• DROP – is used to delete table from the database.
• ALTER-is used to alter the structure of the database.
• TRUNCATE–is used to remove all records from a table, including all spaces
allocated for the records are removed.
• COMMENT –is used to add comments to the data dic onary.
• RENAME –is used to rename an table exis ng in the database.
CREATE :
CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,....]);
DROP:
DROP TABLE TABLE NAME;
ALTER (ADD NEW COLUMN) :
ALTER TABLE table_name ADD column_name C OLUMN-defini on;
ALTER (MODIFY) :
ALTER TABLE MODIFY(COLUMN DEFINITION.... );
TRUNCATE: TRUNCATE TABLE TABLE NAME;
RENAME: RENAME OLD TABLE NAME TO NEW TABLE NAME;