Oracle Flashcards
What is pipeline view?
A view that get data from other views.
What is materialised View?
Materialised view (MV) is similar to a view but the data is actually stored on disk. Often used for summary and Pre-joined tables.
What are the tools for Oracle?
TOAD, PUTTY Linux/Unix, Oracle forms, Oracles reports.
How to get date and time?
Sysdate
What is a snapshot?
snapshot is just like a print screen, read only.
Difference between ref cursor and nomral cursor?
Normal Cursor is static and can be associated with only a single query where as ref cursor is dynamic and can be associated with multiple queries.
Refence Curso is basically used to pass result set to a procedure or function. Can be Strong Type or Weak Type.
What is the difference between Strong and Weak Types?
?
What is Explain Plan?
Just like SQL Server Excuation plan.
Which is faster Truncate or Delete?
Truncate will be faster because delete will have to update logs and do overhead operations and Truncate doesn not.
Where to find database errors?
Alert Log
What is DDL?
Data Definition Language (DDL) statements are used to define the database structure or schema.
Some examples:
CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
COMMENT - add comments to the data dictionary
RENAME - rename an object
What is DML?
Data Manipulation Language (DML) statements are used for managing data within schema objects.
Some examples: SELECT - retrieve data INSERT - insert data into a table UPDATE - updates existing data DELETE - deletes records MERGE - UPSERT operation (insert or update) CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency
Why used an Index?
Faster Access to the data.
What is Fact Table?
A fact table contains measurements.
What is a Dimension Table?
A dimenension table will contain data that will help describe the fact tables.
List some contraints.
Primary or Unique Key
Referential Integrity
Not Null Contraint
Value contraint - to check a column value against a specific set of values.
What type of index shoould you use for a fact table?
A bitmap index.
How to drop and recreate a table children records?
Drop the foreign key constraits first. Drop and recreated, then add constraits back.
How to get the timezone?
Use dbtimezone.
What is the use of Global_Names?
To ensure the use of consistent conventions for database and links in the a networked environment.
How would you encrypt PL/SQL?
Use WRAP.
What is a Package?
Package is the collections of functions, procedures, variables which can be logically grouped together.
What is function?
Function must return a value. can be called inside a query.
What is a procedure?
procedure may or may not return a value.