Learn with Yasir

Share Your Feedback

Review Questions


Review Questions

Oracle

Introduction

  1. Write note on SQLPlus and Differentiate between SQLPlus and SQL developer?

Connecting to Oracle Database and Exploring It

  1. How to connect to oracle database using SQL*Plus and write command to unlocking the HR account?

About DML Statements and Transactions

  1. What is a transaction in oracle database?

  2. Explain committing transactions, rolling back transactions and setting save points in transactions with examples?

Creating and Managing Schema Objects

  1. Write query to create “Students” table with following columns (StudentID numeric, StudentName text, DOB date)?

  2. Write Query to create students table with following columns ( Student_ID numeric type, Student_Name text type, email text type, DOB date type) and add primary key constraint?

  3. Write query to create new user account “ahmad” and assign permissions?

  4. Write query to drop/delete “students” table?

  5. Write the name of any five DDL statements?

  6. Explain Not Null and Unique Constraints?

  7. Explain Not Null and Unique Constraints; write statement to define NOT Null constraint?

  8. Explain different constraints in oracle database?

  9. Write an example to add a Foreign Key constraint using the ALTER TABLE statement?

  10. What is Sequence, write query to create sequence and delete sequence?

  11. What is View, write SQL query to create or replace exiting view for above mentioned “Students” table?

Developing Stored Subprograms and Packages

  1. Write note on subprogram signature and subprogram body and explain its structure?

  2. What is sub program and explain types of stored subprograms?

  3. What is package and explain package specification and package body?

  4. What is package and write pl/sql code to create a package to convert monthly salary into annual salary (using function within package) and add new student record using procedure within package?

Using Triggers

  1. What is trigger and explain its basic parts?

  2. Write note on disabling and enabling triggers and explain OLD and NEW Pseudo-records?

  3. Write PL/SQL code to explain instead of trigger with an example?

  4. Write code to create two triggers, HR_LOGON_TRIGGER and HR_LOGOFF_TRIGGER. After someone logs on as user HR, HR_LOGON_TRIGGER adds a row to the table HR_USERS_LOG. Before someone logs off as user HR, HR_LOGOFF_TRIGGER adds a row to the table HR_USERS_LOG.