SQL and Oracle Database Concepts
Covers SQL fundamentals, database concepts, constraints, views, and Oracle PL/SQL features including cursors, LOBs, and optimization
Questions
Which one of them is not an String Function?
- SOUNDEX
- DIFFERENCE
- GROUPING
- SUBSTRING
What is the function which is used to check whether the value is a numeric value or not?
- Select isnumeric('Test Text')
- Select numeric('Test Text')
- Both of the above
- none of the above
What operator performs pattern matching?
- &
- LIKE
- %
- NONE
Deterministic functions are?
- Functions always return the same result any time they are called with a specific set of input values.
- Functions may return different results each time they are called with a specific set of input values
- None
- Both of Them
SQL_VARIEANT datatype column can be any datatype except?
- TEXT
- IMAGE
- FLOAT
- 1) and 2)
What is the maximum number of columns per select statement allowed in SQL 2005?
- 1024
- 4096
- 512
- 2048
Can we insert data into a view?
- True
- False
Identify two factors that you consider for compiling a PL/SQL program unit for interpreted mode?
- PL/SQL program needs to be recompiled frequently.
- /SQL program that spends most of the time executing SQL
- PL/SQL program , which performs computation-intensive procedural operations and is recompiled rarely
- PL/SQL program , which is called frequently with the same parameter values by multiple sessions and is recompiled rarely.
You designed a CardValidation.java Java source file. You also have the corresponding CardValidation.class file . As a part of invoking a Java class method, you execute this command at the command prompt: Loadjava –user oe/oe CardValidation.java . Which statement is true about the command?
- It loads the Java code into the database.
- It publishes Java methods in CardValidation.java
- It loads the metadata related to the Java class file into the database.
- It loads the Java class file into the Java pool in the database instance.
Examine the settings for a user session given below : RESULT_CACHE_MODE =FORCE. What would be the implications of this setting on query execution?
- Query results are bigger than the available space in the result cache are not cached
- Query results are stored even when you explicitly use the /*+ no_result_cache */ hint in query.
- All query results are stored in the result cache if possible.
- Query results are stored only when you explicitly use the /*+ result_cache */ hint in your query
Which statements are true about internal LOBs?
- They can be used as attributes of a user-defined data type.
- They cannot use redo logging.
- They cannot be passed as parameters to PL/SQL subprograms.
- They can be stored in a tablespace that is different from the tablespace that stores the table containing the LOB column
Which statements are true about the SecureFile storage paradigm?
- SecureFiles storage can be used for internal and external LOBs
- ASSM must be enabled for a tablespace to store SecureFile LOBs
- SecureFile is the default storeage paradigm for all LOBs
- SecureFile options enabled for a LOB column can be overridden on a per-LOB basis wihtin the LOB column
Which statements are true about inlining of PL/SQL subprograms?
- Only local subroutins can be inlined
- Inlining always reduces the execution time for the PL/SQL program unit
- PLSQL_OPTIMIZE_LEVEL must be set to a value greater than or equal to 2
- the PL/SQL programs that make use of relatively large helper subroutines are good candidates for inlining
Which two reports can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL package?
- DDL report for all objects dependent on a table
- DDL report for all the invalidated objects in a schema
- data definition language (DDL) report for all the tables in a schema
- DDL report for all the objects stored in a tablespace
Which two statements are true about cursor variables?
- A cursor variable points to the current roe in the result set of a multirow query stored in work area
- A cursor variable is an explicitly named work area in which the results of different multirow queries can be stored.
- A cursor variable can be used only if a query is performed and its results are processed in the same subprogram.
- A cursor variable can be used to perform a query in one subprogram , and process results in a different sub program
What is a constraint?
- It is a standard method to enforce information integrity
- It is a standard method to manipulate data in databases
- They are policies to enforce security access to database
- Are method that allow users to authenticate
What do we call a superkey?
- When a field that is a primary key cannot be used a foreign key because of security policies
- When a primary key is composed by more than field
- When a primary key is a set of fields that are foreign keys
- When a set of fields that are foreign keys are set as a primary key
What does the stack space in a PGA hold?
- stack variables and other info
- session's variables and arrays
- session info stored in PGA
- binding variables and runtime buffers
The HAVING clause was added to SQL because the WHERE keyword could be used with aggregate functions.
- True
- False
The FULL JOIN keyword return rows when there is a match in one of the tables.
- True
- False