ORACLE INTERVIEW QUESTION & ANSWERS
46. |
Define primary key? |
|
- The primary key is the column(s) used to uniquely identify each row of a table.
- No primary key value can appear in more than one row in the table.
- A table can have only one primary key.
- A primary key column cannot be of datatype LONG or LONG RAW.
|
|
Posted by Manjula. (Dec 17, 2014) |
|
Primary Key should be NOT NULL |
47. |
Define unique key? |
|
- Unique key is a one or more column that must be unique for each row of the table.
- It is similar to primary key.
- Primary key column will not accept a null. Whereas the unique key column will accept a null values.
|
48. |
Define foreign key? |
|
- A foreign key is a combination of columns with value is based on the primary key values from another table.
- A foreign key constraint, also known as referential integrity constraint.
- Foreign key identifies the column or combination of columns in the child table that makes up of the foreign key.
|
49. |
What is system global area (SGA)? |
|
The SGA is a shared-memory region that Oracle uses to store data and control information for one Oracle instance. The SGA is allocated when the Oracle instance starts: it is deallocated when the
Oracle instance shuts down. Each Oracle instance that starts lias its own SGA. The information in the
SGA is made up of the database buffers, the redo log buffer, and the shared pool: each has a fixed size
and is created at instance startup. |
50. |
What happens if a failure corrupts the datafiles? |
|
When a datafile is lost, the corrupted file can be restored from a backup. After the datafile is restored, the redo log files and archive log files can reapply any changes made before the time of the failure. No data is lost. |