0% found this document useful (0 votes)
22 views11 pages

19BCE2651 (Cycle Sheet 1)

The document provides instructions to create tables for a company database with employee, department, dependent, and project tables. It also lists queries to run on the database including finding employee ages, printing future years, listing month of births, converting project names to uppercase, padding department names with stars, printing first characters of names, and finding longest department name length.

Uploaded by

namus nadnat
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)
22 views11 pages

19BCE2651 (Cycle Sheet 1)

The document provides instructions to create tables for a company database with employee, department, dependent, and project tables. It also lists queries to run on the database including finding employee ages, printing future years, listing month of births, converting project names to uppercase, padding department names with stars, printing first characters of names, and finding longest department name length.

Uploaded by

namus nadnat
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/ 11

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’.

You might also like