Q.1 What is database Trigger?
Ans: A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted.
Q.2 What are the different types of data models ?
Ans:
- Entity relationship model
- Relational model
- Hierarchical model
- Network model
- Object oriented model
- Object relational model
Q.3 What is Self Join?
Ans: A self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it involves a relationship with only one table.
Q.4 What are the type of Synonyms?
Ans: There are two types of Synonyms are :
- Private
- Public
Q.5 What is an Integrity Constrains?
Ans: An integrity constraint is a declarative way to define a business rule for a column of a table.
Q.6 What is referential integrity?
Ans: Referential integrity refers to the consistency that must be maintained between primary and foreign keys, i.e. every foreign key value must have a corresponding primary key value.Q.7 What is Table?
Ans: A table is the basic unit of data storage in an ORACLE database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.
Q.8 What is a synonym?
Ans: A synonym is an alias for a table, view, sequence or program unit.Q.9 What is Rollback Segment?
Ans: A Database contains one or more Rollback Segments to temporarily store "undo" information.Q.10 What does COMMIT do?
Ans: A Commit makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed.Q.11 What are defaults? Is there a column to which a default can't be bound?
Ans: A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them. See CREATE DEFUALT in books online.Q.12 What is diffrence between Co-related sub query and nested sub query?
Ans: Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query.Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row.Q.13 What is the use of DBCC commands?
Ans: DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.Q.14 What is a Linked Server?
Ans: Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements. With a linked server, you can create very clean, easy to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data.Q.15 What is Collation?
Ans: Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.Q.16 What are different type of Collation Sensitivity?
Ans: The different phases of transaction are- Kana Sensitivity
- Width sensitivity
- Case sensitivity
- Accent sensitivity
Q.17 What is the difference between a primary key and a unique key?
Ans: Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn’t allow NULLs, but unique key allows one NULL only.Q.18 What is the difference between Function and Stored Procedure?
Ans: Difference between Function and Stored Procedure- UDF can be used in the SQL statements anywhere in the WHERE / HAVING / SELECT section where as Stored procedures cannot be.
- UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.
- Inline UDF’s can be though of as views that take parameters and can be used in JOINs and other Rowset operations.