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.