Interview :: oracle
A synonym is also known as alias for a table, view, sequence or program unit.
There are two types of synonyms or alias:
Private: It can only accessed by the owner.
Public: It can be accessed by any database user.
What is the usage of synonyms?
- Synonym can be used to hide the real name and owner of an object.
- It provides public access to an object.
- It also provides location transparency for tables, views or program units of a remote database.
- It simplifies the SQL statements for database users.
How do you store pictures in a database?
Yes, you can store pictures in a database using Long Raw Data type. This data type is used to store binary data for 2 gigabytes of length. However, the table can have only one Long Raw data type.
BLOB data type is a data type with varying length binary string. It is used to store two gigabytes memory. For BLOB data type, the length needs to be specified in bytes.
Translate is used to substitute a character by character while Replace is used to substitute a single character with a word.
A list of different types of database objects:
- Tables: This is a set of elements organized in vertical and horizontal fashion.
- Tablespaces: This is a logical storage unit in Oracle.
- Views: It is virtual table derived from one or more tables.
- Indexes: This is a performance tuning method to process the records.
- Synonyms: This is a name for tables.
Save Points are used to divide a transaction into smaller phases. It enables rolling back part of a transaction. There are maximum 5 save points allowed in Oracle Database. Whenever an error is encountered, it is possible to rollback from the point where the SAVEPOINT has been saved.
The post-database commit trigger is executed after Oracle forms issue the commit to finalized transaction while, the post-form commit is fired during the post and commit transactions process, after the database commit occurs.
Logical backup is used to read a set of database records and writing them into a file. An Export utility is used to take the backup while an Import utility is used to recover from the backup.