Tag: programming languages

Questions Related to programming languages

  1. Mapping files can be added to Configuration in the application code

  2. They can be configured in hibernate.cfg.xml using the elements

  3. Both a and b

  4. None of the above


Correct Option: C

What is the root level element in a hibernate mapping file?

  1. None


Correct Option: C
  1. StandardQueryCache and UpdateTimestampsCache

  2. StandardQueryCache

  3. QueryCache

  4. QueryCache and TimestampsCache


Correct Option: A
  1. lazy="true"

  2. lazy="false"

  3. lazy="on"

  4. lazy="off"


Correct Option: A
  1. lazy=false;

  2. lazy=true;

  3. lazy=yes;

  4. lazy=no;


Correct Option: B
  1. Session.createQuery();

  2. Session.createCriteria();

  3. Session.createSQLQuery();

  4. Session.lod();


Correct Option: A
  1. The size of an undo block

  2. The size of the redo log files

  3. The size of the database buffer cache.

  4. The value of the UNDO_RETENTION parameter.

  5. Undo blocks generated per second.


Correct Option: A,D,E
  1. By auditing the all DML operations on table.

  2. By using external table

  3. By using triggers.

  4. By using anonymous PL/SQL blocks


Correct Option: C
Explanation:

To achieve the given objective, you can use triggers, which are special PL/SQL programs that are automatically executed in response to specific DML events.

Option A: Auditing the DML operations on the table would provide information about who performed the transactions, but it would not capture the values used in the transactions. Additionally, the auditing information may not be easily transferable to another table for analysis.

Option B: Using an external table would not help in tracking users who performed the transactions and the values used in the transactions. External tables are used to map data in flat files into database tables, or to query data in external sources as if it were in a table. They are not designed for capturing transaction details.

Option C: Using triggers would help you track the users who performed the transactions and the values used in the transactions. You can create a trigger to automatically insert a row into another table, such as an audit table, when a DML operation occurs on the original table. The inserted row can contain information such as the user who performed the transaction, the type of transaction (insert, update, or delete), the date and time of the transaction, and the values used in the transaction. This information can be used for analysis and to detect unauthorized activity.

Option D: Using anonymous PL/SQL blocks would not help in tracking users who performed the transactions and the values used in the transactions. Anonymous PL/SQL blocks are used to execute a sequence of SQL and PL/SQL statements and are not designed for capturing transaction details.

Therefore, the correct option is:

The Answer is: C. By using triggers.

You want to refer the employee personal information stored in Operating System files EMPLOYEE table. You plan to add a new column in EMPLOYEE table to achieve this. Which data type would you use for the new column?

  1. BFILE

  2. BLOB

  3. CLOB

  4. LONG RAW


Correct Option: A