Oracle General Question & Answers:

Oracle General Question & Answers:


  1. What is data?

Data is a collection of raw, facts and figures that is use in different place we can store anything in database is called data.

  1. What is database?

Collection of organized data which can easily managed access, understand, and update.

  1. What is database management system?

Any programming environment used to create containers, to manage human data, can be conceptualized as a Data Management System

  1. What is table?

It is a set of elements that is consist of rows and columns in which we can store our data. In any table we define specified no, of columns and there are many no. of rows are available in table that is use for store the data row wise.

  1. What is column?

Column is a one element of table that is use logically vertical shape in table. We define specified no. of columns in one table then store data in it.

  1. What is row?

Rows are also second element of table that is use for store the data in table as a horizontally shape. We can enter many rows in one table. In database terms we can say one record to one row in table.

  1. What is primary key?

A primary is uniquely identifies a row of the table this key ensure two things one is that null value does not allow and duplicate value also not allowed in table. A table must always have one and only one primary key. Primary key value is normally employee code, Driving license code, NIC code etc.

  1. What is foreign key?

A foreign key is a references or a link between one table and another. The foreign key can be used to cross reference tables. A foreign has a link with parent table (that have primary key value). Suppose we have one table with primary key and w have second table that have foreign key and have a relation with parent table than we must enter the values in second table that is totally related with parent table.

  1. What is unique key?

Unique key does not accept duplicate values but accept null values in oracle. Unique key is very much related with primary key in primary key we cannot enter NULL value and also duplicate value. But on the other hand in unique key we can enter NULL value but not duplicate value. For example in employee database we set Driving license no. unique because one employee have unique license no. and some employees have not.

  1. What is the difference between primary key and unique key?

Unique key does not accept duplicate values but accept null values and primary key does not accept both two either NULL  or duplicate data.

  1. What is Null constraint?

The columns that have NULL constraint must fill with some data. A column in a table can be specified not null. It’s not possible to insert a null in such a column we cannot leave any column empty in tables that have NULL constraint. It should be fill with no matter with duplication of that.

  1. What is the maximum no. of column in oracle table?

The maximum no. of columns is 255.

  1. Is COMMIT statement can be use in database trigger?

We cannot use any transaction control statement (like commit, rollback, savepoint etc.) into the body of a trigger. But oracle provides a facility called Autonomous Transactions through which you can achieve this. You add that piece of the code, which contains commit, in some block and make that block as Autonomous Transaction and call or use that block into your trigger.