0% found this document useful (0 votes)
3 views2 pages

Dbms Assignment 3

The document is an assignment for a Database Management System (DBMS) course, outlining various tasks related to SQL and database concepts. It includes questions on differentiating DDL, DML, and DCL, creating and modifying tables, understanding data integrity constraints, and working with views. Additionally, it requires practical SQL commands for table creation, data insertion, updates, and deletions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Dbms Assignment 3

The document is an assignment for a Database Management System (DBMS) course, outlining various tasks related to SQL and database concepts. It includes questions on differentiating DDL, DML, and DCL, creating and modifying tables, understanding data integrity constraints, and working with views. Additionally, it requires practical SQL commands for table creation, data insertion, updates, and deletions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DBMS ( ASSIGNMENT-3 )

GIVE THEANSWER FOR ALL THE QUESTION IN GU


FORMATE (GU Pages, GU Index, GU File style)
1. Differentiate DDL, DML, and DCL with two examples each. Also
explain how they affect the database storage.

2. Create a table named CUSTOMER using at least five different data


types. Also include constraints such as PRIMARY KEY, UNIQUE, and
CHECK.

3. Write SQL commands to perform the following using ALTER


TABLE:
a) Add a new column EMAIL
b) Modify the size of the NAME column
c) Drop the AGE column

4. Explain the difference between DROP and DELETE, with proper


examples and their impact on data recovery.

5. Insert at least five records into a COURSE table (CID, CNAME,


DURATION, FEES). Use both single-row and multi-row insert
statements.

6. For a SALARY table, write queries to:


a) Update salary of employees earning less than 20000
b) Delete records of employees who have resigned

7. Explain with examples how the following constraints ensure


data integrity:
PRIMARY KEY, NOT NULL, UNIQUE, CHECK, DEFAULT, and
FOREIGN KEY.

8. Write SQL syntax to create an ORDERS table with constraints


such as PRIMARY KEY, NOT NULL, UNIQUE, and FOREIGN KEY
Include meaningful sample values.
9. What are Views? Create a view called HIGH_SALARY showing
employees earning above 50,000. Also write SQL to update data
through the view.

10. Create a STUDENT table Write SQL syntax to create a STUDENT table
with the following fields:

SID (integer, Primary Key)

NAME (varchar)

AGE (int)

COURSE (varchar)

CITY (var-char), FEES (decimal)


Apply NOT NULL constraints where needed.

You might also like