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

Database Creation and Table Management Guide

This document outlines a database creation experiment for a computer engineering course, detailing steps to create and modify tables, including the Employees and Department tables. It specifies the required resources such as operating system, disk space, RAM, and software. Additionally, it includes operations like creating, altering, truncating, renaming, and dropping tables, along with applying key constraints for data integrity.

Uploaded by

dhruvytofficial1
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)
5 views2 pages

Database Creation and Table Management Guide

This document outlines a database creation experiment for a computer engineering course, detailing steps to create and modify tables, including the Employees and Department tables. It specifies the required resources such as operating system, disk space, RAM, and software. Additionally, it includes operations like creating, altering, truncating, renaming, and dropping tables, along with applying key constraints for data integrity.

Uploaded by

dhruvytofficial1
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

DEPARTMENT OF ELECTRONICS & COMPUTER

ENGINEERING
Experiment No. 3: *1) Create Database for given application
2) Create tables for the given application
3)Assign Primary key for created table
4) Modify the table as per the application needs.
Required Resources with specifications:

Sr. Particulars Specification


No.
1. Operating system Windows 10 or higher
2. Disk space 8.5 gigabytes min for oracle
software, plus 2 gigabytes or
more for temporary storage
3. RAM 2 Gigabytes RAM minimum
4. Software mysql

DDL Table Operations


1. Perform the following operations step-by-step on a table named Employees:
2. Create Table
- Emp ID (integer)
- First Name (varchar 50)
- Last Name (varchar 50)
- Department (varchar 50)
- Salary (decimal 10,2)
3. Alter Table
- Add a new column Date Of Joining (DATE)
- Modify Last Name to VARCHAR(100)
- Drop the Department column
4. Truncate Table
- Use TRUNCATE to delete all rows from the table.
5. Rename Table
- Rename Employees to Staff.
6. Drop Table
- Drop the Staff table.

Apply Key Constraints


1. Create a Department table with:
- DeptID (integer, Primary Key)
- DeptName (varchar 100, NOT NULL, UNIQUE)

2. Create an Employees table with:


- EmpID (integer, Primary Key)
- FirstName (varchar 50, NOT NULL)
- LastName (varchar 50, NOT NULL)
- Email (varchar 100, UNIQUE)
- Salary (decimal 10,2, CHECK Salary > 0)
- DeptID (integer, FOREIGN KEY referencing [Link])
DEPARTMENT OF ELECTRONICS & COMPUTER
ENGINEERING

Screen shots

You might also like