0% found this document useful (0 votes)
37 views

dbms file

The document outlines the creation of a college database and an employee database, detailing entities such as STUDENT, SEMSEC, CLASS, SUBJECT, IAMARKS, and EMP. It includes instructions for drawing E-R diagrams, converting entities to relation tables, and performing SQL operations like creating tables, inserting tuples, and altering table structures. Additionally, it covers basic DBMS terminology, SQL characteristics, and aggregate functions for querying employee salaries.

Uploaded by

devdutt9917
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)
37 views

dbms file

The document outlines the creation of a college database and an employee database, detailing entities such as STUDENT, SEMSEC, CLASS, SUBJECT, IAMARKS, and EMP. It includes instructions for drawing E-R diagrams, converting entities to relation tables, and performing SQL operations like creating tables, inserting tuples, and altering table structures. Additionally, it covers basic DBMS terminology, SQL characteristics, and aggregate functions for querying employee salaries.

Uploaded by

devdutt9917
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/ 9

Draw E-R diagram and

convert entities and


relationships to
relation table for a given
scenario. (eg. College)
COLLEGE DATABASE:
STUDENT (USN, SName,
Address, Phone, Gender)
SEMSEC (SSID, sem, sec)
CLASS (USN, SSID)
SUBJECT (Subcode, Title,
Sem, Credits)
IAMARKS (USN, Subcode,
SSID, Testi, Test2, Test3,
FinallA)
Draw E-R diagram and
convert entities and
relationships to
relation table for a given
scenario. (eg. College)
COLLEGE DATABASE:
STUDENT (USN, SName,
Address, Phone, Gender)
SEMSEC (SSID, sem, sec)
CLASS (USN, SSID)
SUBJECT (Subcode, Title,
Sem, Credits)
IAMARKS (USN, Subcode,
SSID, Testi, Test2, Test3,
FinallA)
2. The EMPLOYEE
database has a table with
the following
attributes. The primary
keys are underlined.
EMP (Empno: int, name:
string, dob: date, PhNo:
int)
a) Create the above
table.
b) Display table
Structure.
c) Enter five tuples into
the table.
d) Display all the tuples
in EMP
table. Solution:
a). Create the table
EMP
SQL> create table EMP
(Empno integer,name
varchar(15),dob
date,Phno integer,primary
key(Empno));
Draw E-R diagram and
convert entities and
relationships to
relation table for a given
scenario. (eg. College)
COLLEGE DATABASE:
STUDENT (USN, SName,
Address, Phone, Gender)
SEMSEC (SSID, sem, sec)
CLASS (USN, SSID)
SUBJECT (Subcode, Title,
Sem, Credits)
IAMARKS (USN, Subcode,
SSID, Testi, Test2, Test3,
FinallA)
2. The EMPLOYEE
database has a table with
the following
attributes. The primary
keys are underlined.
EMP (Empno: int, name:
string, dob: date, PhNo:
int)
a) Create the above
table.
b) Display table
Structure.
c) Enter five tuples into
the table.
d) Display all the tuples
in EMP
table. Solution:
a). Create the table
EMP
SQL> create table EMP
(Empno integer,name
varchar(15),dob
date,Phno integer,primary
key(Empno));
Draw E-R diagram and
convert entities and
relationships to
relation table for a given
scenario. (eg. College)
Draw E-R diagram and
convert entities and
relationships to
relation table for a given
scenario. (eg. College)
I. Draw E-R diagram and
convert entities and
relationships to
I. Draw E-R diagram and
convert entities and
relationships to
Part -I( Use Cases)
1. What is DBMS basic Terminology?
2. Explain SQL and its characteristics.
3. Define all kind of SQL command with appropriate Example.
4. Explore all supportive data types in SQL.
5. Give Example of DBMS used for Structured and unstructured databases.

Part –II(Experiments)

1. I. Draw E-R diagram and convert entities and relationships to relation table for a given
scenario. (eg. College).
COLLEGE DATABASE:
STUDENT (USN, SName, Address, Phone, Gender)
SEMSEC (SSID, sem, sec) CLASS (USN, SSID)
SUBJECT (Subcode, Title, Sem, Credits)
IAMARKS (USN, Subcode, SSID, Testi, Test2, Test3, FinallA)
2. The EMPLOYEE database has a table with the following attributes. The primary keys are
underlined.
EMP (Empno: int, name: string, dob: date, PhNo: int)
a) Create the above table.
b) Display table Structure.
c) Enter five tuples into the table.
d) Display all the tuples in EMP
3. Enter 5 tuples into the table.
4. Perform the following: Consider Dept table: (DEPTNO, DNAME, LOC) Perform the
following:
a. Altering a Table,
b. Dropping/Truncating/Renaming Tables,
c. Rename the table dept as department
d. Add a new column PINCODE with not null constraints to the existing table DEPT
e. Rename the column DNAME to DEPT_NAME in dept table
f. Change the data type of column loc as CHAR with size 10
5. Write a query to implement check constraints on an Employee Table by taking appropriate example.
6. By taking an example, To Practice Aggregate functions using oracle.
7. Consider the following STUDENT (Registerno, Name, Address, Phone, Gender)
a. Inserting/Updating/Deleting Records in a Table, Saving (Commit) and Undoing (rollback)
b. Backing up / Restoring a Database.

Find the sum of the


salaries of all employees of
the 'Accounts' department,
as well as
the maximum salary, the
minimum salary, and the
average salary in this
department.
8. Find the sum of the salaries of all employees of the 'Accounts' department, as well as the maximum
salary, the minimum salary, and the average salary in this department.

You might also like