Professional Documents
Culture Documents
AlGhushaimi. نهائي قواعد بيانات 2020
AlGhushaimi. نهائي قواعد بيانات 2020
لقد قمت بتجميع جزء من ما تذكرته من اختبار قواعد بيانات(اوراكل) للعام 2020وليس كامال.
الهدف مساعدتك لمعرفة مدى فهمك ومدى استعدادك لخوض االختبار وليس لحفظ جواب أسئلة النموذج
المادة بسيطة وممتعة ما عليك اال االستمتاع بمذاكرتها وحل اكثر جزء من التمارين
وهللا الموفق
Q1 i Create the DEPT table based on the following table instance chart .
Confirm that the table is created
ii Create the EMP table based on the following table instance chart.
Add a table-level PRIMARY KEY constraint to the EMP table on the ID column
- Add a foreign key reference on the EMP2 table that ensures that the employee is not assigned to a
write a query that displays the grade of all employees based on the value of the JOB_ID column, using the
following data:
Q3 Create a report that displays a list of all employees whose salary is more than the salary of any employee
from department 60.
Q4 Create a report for the HR department that displays employee last names, department numbers, and all
employees who work in the same department as a given employee. Give each column an appropriate label
- Q6 - Show all employees who have managers with a salary higher than $15,000. Show the following
data: employee name, manager name, manager salary, and salary grade of the manager.
- Q7 - Create a view named DEPT80 that contains the employee numbers, employee last names, and
department numbers for all employees in department 80. They have requested that you label the view
columns EMPNO, EMPLOYEE, and DEPTNO. For security purposes, do not allow an employee to be
reassigned to another department through the view.
C) heading D) declarative
Answer: B
A) 4 B) 8 C.)0 D) 10 E) 6
Answer: B
Q11 Which should you do after each FETCH statement in a PL/SQL block?
. Answer: D
Answer: D
Q13 You need to remove all the data from the employee table while leaving the table definition intact. You
want to be able to undo this operation. How would you accomplish this task?
Answer: B
Q14 Given this executable section of a PL/SQL block:
BEGIN
A) The cursor does not need to be closed. B. No FETCH statements were issued.
Answer: A
BEGIN
END;
. ‘ ---- ‘ بداخلstring يجب ان يكون. ’ -----‘ بداخلstring ركز ان كان. يجب ان ال يتكرر في الجدول
EMP_ID is the Primary key of regions table and therefore must be unique. EMP_ ID =1 may be already exists
in the table
Q16 Create a synonym for your EMPLOYEES table. Call it EMP1. Then find the names of all synonyms that are in
your schema
(CDB) (وPDB) لا أتذكر صيغة السؤال بالضبط كان يتحدث عن
Q17 how to startup container databases (CDB) and pluggable databases (PDB). اظن السؤال كذا
اظن انه كيف نفتح قواعد البيانات عندما تتغلف لان هذة المشكلة كانت تواجهنا في اغلب الاحيان
i manually
• manually
databasename
هنا نضع االسم الذي وضعناه نحن اثناء التثبيت والذي اسماها الدكتور
فقطyemenpdb في هذه الحالة سوف يفتخ قواعد البيانات ثم نستخدم هذا االمر
Insert employee(fname,lname)
Set(‘A’,’B’);
1. The package body has methods declared in package specification and private.
2. It is created using the CREATE PACKAGE Statement.
3. Methods and types declared in package body are not hidden from code outside
4. All of the above.
Answer :1
Q21 The business hours for the video store are 8:00 AM through 10:00 PM,
Saturday through Wednesday
, and 8: 00 AM through 12: 00 AM on Friday. To ensure that the tables can be modified only during
these hours, create a stored procedure that is called by triggers on the tables.
a. Create a stored procedure called TIME_CHECK that checks the current time against business hours. If
the current time is not within business hours, use the RAISE_APPLICATION_ERROR procedure to
give an appropriate message.
b.
Create a trigger Fire the trigger before data is inserted, updated, and deleted from the tables. Call your
TIME_CHECK procedure from each of these triggers.
Q22 Write a function that converts currency from dollars $ to Yemeni riyals (RY)
Where 1$=500RY.
Qذ23
طلب استدعاء الدالة وطباعة القيم التي تسترجعها الدالة بطريقتين مختلفتين
Q24
write a function (procedure) consisting of
i- RAISE_APPLICATION_ERROR
ii- PRAGMA EXCEPTION_INIT
iii- SQLCODE
iii- SQLERRM
.
.
.
..... للاسئلة بقية
•
؏؏
ﻋﺒﺪﺍﻟﺮﺣﻤﻦﺍﻟﻐﺸﻴﻤ