NAME: SUMAN TANDAN
REG.NO: 19BCE2651
DATABASE MANAGEMENT SYSTEM
DBMS-2004
--------------------------------------------------------------------
----
Create the following tables
Company Database
Employee (SSN, Name (fname, Minit, Lname), Sex, Address,salary, DOB, Department, designation,
SupervisorSSN)
Department (Number, Name, ManagerSSN, Manager_DOB, Location)
Dependent (Name, DOB, Sex, Relationship, Employee SSN)
Project (Number, Name, Location, Controlling Department, Budget)
Works_on (SSN, Project Num, Hours)
a. Make the underlined columns as primary key.
b. Insert at least 5 rows to each table.
(Apply Interactive insertion. Check Entity Integrity Constraint and key Constraint.)
Queries on SQL * PLUS functions.
1. Find the age of an Employee.
2. Print the year 12 years later than an employee’s birth year.
3. Print the month of births of all employees.
4. Print the Project names in Upper case
5. Print department names with left padded stars.
6. Print the first five characters of employee first names.
7. Print the length of longest department name.
8. Replace the a’s present in employee names with ‘e’.