Professional Documents
Culture Documents
ASSINGMENT #0 (Fundamental Queries) Questions #1: CSF-505-Database Management Dr. Imran Khan
ASSINGMENT #0 (Fundamental Queries) Questions #1: CSF-505-Database Management Dr. Imran Khan
Questions #1
Installation of Oracle 19c Rel 3 on your laptop and run the following commands after the
successful installations:
Step 1:
To find out the name of all the pluggable databases available in your system you can
query v$pbds view.
Step 2: Add and Update the following commands in tnsname.ora file located in
ORACLE_HOME/network/admin
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
_______________________________________________________________________
CSF-505-Database Management Dr. Imran Khan
Department of Computer Science – School of Mathematics and Computer Science
Institute of Business Administration
Step 6: Log in to your database using HR user
Questions #2
OR
If you are using apex.oracle.com then upload demobld.sql file on your workspace
and run.
1. Display the details of all the employees who are working in the organization.
2. List all the rows from the table SALGRADE.
3. List all the rows from the table DEPT.
4. Display the structure of the table EMP.
5. Display the structure of the table SALGRADE.
6. Display the structure of the table DEPT.
7. List all the tables.
8. What are the employee numbers of all the employees?
9. What are the employee names of all the employees?
10. List all JOBS from EMP.
11. Display the SALARIES of all the employees.
12. How do we get to know, when did all the employees join the company?
13. Is there anyone who is taking commission? If yes then display.
14. Who is the manager of whom?
15. What are the departments of every employee?
16. Display the job designation with their employee number. List all EMPLOYEE
NUMBER, EMPLOYEE NAME, JOB, MGR, SALARY from EMP.
17. List all EMPLOYEE NUMBER, EMPLOYEE NAME, JOB, MGR,
SALARY, HIREDATE, COMMISSION from EMP.
18. List all EMPLOYEE NUMBER, EMPLOYEE NAME, MGR, SALARY,
HIREDATE, COMMISSION, DEPARTMENT NUMBER from EMP.
19. What are the DEPARTMENT NUMBER, JOBS of all the employees?
20. What is the DEPARTMENT NAME and JOB of all the employees?
21. Where are all the departments’ located?
22. What is the department number and department name of all the departments?
23. Display the department number of all the departments with their location and
name.
_______________________________________________________________________
CSF-505-Database Management Dr. Imran Khan
Department of Computer Science – School of Mathematics and Computer Science
Institute of Business Administration
24. List all the GRADES from SALGRADE.
25. List all the LOW-SAL from SALGRADE.
26. List all the HI-SAL from SALGRADE.
27. List all the LOW-SAL, HI-SAL, grade from SALGRADE.
Deliverables:
1. Submit the screenshots of successful installation message of Oracle 19c Rel 3 and
also the screenshot of successful HR user login screen.
2. Submit the spool file of all the commands. (only the successful commands)
e.g. You can create spool file using the following command in Oracle SQL Plus:
SQL>spool d:\queries.sql
OR
If you are using apex.oracle.com then submit the screenshots of the successful
queries with output.
The Instructions
• This is an INDIVIDUAL assignment. Submission in the group is not allowed
• Due Date: 8.00 am Tuesday, 31st August 2021.
• No extensions will be given: Penalties are applied to late submissions (5% of total
assignment mark given is deducted per day, accepted up to 5 days after the due date
only). Note that delays caused by computer downtime cannot be accepted as a valid
reason for late submission without penalty. Students must plan their work to allow for
both scheduled and unscheduled downtime.
_______________________________________________________________________
CSF-505-Database Management Dr. Imran Khan
Department of Computer Science – School of Mathematics and Computer Science
Institute of Business Administration