Akashdbmslab 3
Akashdbmslab 3
Laboratory 3
Title of the Laboratory Exercise: Entity Integrity and Referential Integrity Constraints
3. Experimental Procedure
i. Analyse the problem statement
ii. Execute DDL and DML commands
iii. Create a database for the given schema
iv. Design SQL commands using DDL and DML commands
v. Test the executed commands for constraint violations
vi. Analyse and discuss the outcomes of your experiment
vii. Document the work
4. Questions
a. Consider the following relational schema that keeps track of the employees in a
company. Enter three tuples for the relation. Assume appropriate domain and data type
for each field.
EMPLOYEE (Name, SSN, Salary, gender, phone, super_ssn, dno)
DEPARTMENT(dname,dnumber)
1
Name: AKASH A P Registration Number:22ETIS411004
2
Name: AKASH A P Registration Number:22ETIS411004
iv) Check for the violation of constraints from referencing table and referenced table.
5. Conclusion:
n this laboratory exercise, we successfully explored the foundational concepts of SQL, focusing
on Data
Definition Language (DDL) and Data Manipulation Language (DML) commands. Through
practical implementation, we created a database, defined its schema, and manipulated data
within it using SQL
commands.
The exercise enhanced our understanding of:
Using DDL commands to establish and modify the structure of a database.
Applying DML commands to manage data by inserting, updating, deleting, and retrieving
records.
By practicing these commands, we strengthened our ability to interact with relational
databases, a crucial skill for database management and application development. This lab
provides a solid foundation for more
advanced SQL operations and database design techniques in future exercises.
3
Name: AKASH A P Registration Number:22ETIS411004