Set - 6

Question 41 :

What is the purpose of UPDATE STATISTICS?

Answer :

UPDATE STATISTICS- it updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view.


Question 42 :

How do you use DBCC statements to monitor various ASPects of a SQL Server installation?

Answer :

Database Consistency Checker (DBCC) - Is a statement used to check the logical and physical consistency of a database, check memory usage, decrease the size of a database, check performance statistics, and so on. Database consistency checker (DBCC) ensures the physical and logical consistency of a database, but is not corrective. DBCC can help in repairing or checking the installation in case of any failure.


Question 43 :

What is referential integrity and how can we achieve it?

Answer :

Referential integrity preserves the defined relationships between tables when records are entered or deleted. In SQL Server, referential integrity is based on relationships between foreign keys and primary keys or between foreign keys and unique keys. Referential integrity ensures that key values are consistent across tables. Such consistency requires that there be no references to nonexistent values and that if a key value changes, all references to it change consistently throughout the database.
We can achieve this by using foreign key.


Question 44 :

What is indexing?

Answer :

If we give proper indexes on a table so that any queries written against this table can run efficiently. As your data sets grow over time, SQL Server will continue to rebuild indexes and move data around as efficiently as possible. This property is known as Indexing.


Question 45 :

Explain differences between Server.Transfer and server.execute method?

Answer :

Answer1:
server.transfer-> transfers the server's control to the requested page given in the parameter.
server.Execute-> executes the requested page from the current page itself, with no change in the address bar. after execution the next line of code is executed in the current page.

Answer2.
Execute method returns control to the page in which it is called once the page specified in the Execute method finishes processing, the Transfer method does not return control to the calling page.