SQL Interview Question And Answer | SQL Interview Question And Answer for Fresher | SQL Server | Set-05

1.What is View?
 Ans: View is a virtual table in the database  whose contains are defined  by  a query. To the database user, the view appear just like a real table with a set of named columns and rows of data. Every view has a Query attached to it. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

2.What is TRIGGER?
 Ans: A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS. Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; DBMS automatically fires the trigger as a result of a data modification to the associated table.

3.What is Nested Trigger?
 Ans: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.

4.What is an Integrity Constrains ?
 Ans: An integrity constraint is a declarative way to define a business rule for a column of a table.

5.What is an Index ?
 Ans: An Index is an optional structure associated with a table to have direct access to rows,   which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.

6.What is Cursor?
 Ans: Cursor is a database object used by applications to manipulate data in a set on a row-by- row basis, instead of the typical SQL commands that operate on all the rows in the set at one time.

      In order to work with a cursor we need to perform some steps in the following order:
        1. Declare cursor
        2.Open cursor
        3. Fetch row from the cursor
        4.Process fetched row
        5.Close cursor
        6.Deallocate cursor


7.What is an Index Segment ?
 Ans: Each Index has an Index segment that stores all of its data.

8.What is hit ratio ?
 Ans: It is a measure of well the data cache buffer is handling requests for data. Hit Ratio = (Logical Reads - Physical Reads - Hits Misses)/ Logical Reads.

9.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. Stored Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.

10.What is DataWarehousing?
 Ans: 1.Subject-oriented, meaning that the data in the database is organized so that all the data elements relating to the same real-world event or object are linked together;
          2.Time-variant, meaning that the changes to the data in the database are tracked and recorded so that reports can be produced showing changes over time;
          3.Non-volatile, meaning that data in the database is never over-written or deleted, once committed, the data is static, read-only, but retained for future reporting.
          4.Integrated, meaning that the database contains data from most or all of an organization's operational applications, and that this data is made consistent.
   
Previous Next


:: Click the links below for similar type Questions and answers ::

>

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes