Pages

Wednesday 18 November 2015

SQL SERVER (DBMS & RDBMS) REAL TIME INTERVIEW QUESTIONS AND ANSWERS

1. What is Data Warehousing?
Ans :  It usually contains historical data derived from transaction data, but it can include data from                other sources.

2. What is OLTP (online Transaction Processing)?
Ans : OLTP - Online Transaction Processing
          On regular basis if you are processing transaction information is nothing but OLTP. It contains            live data(Current Data).

3. What is Data?
Ans : Data is nothing but a valid fact which has some feature reference value.

4. What is Information?
Ans : Processed Data is know as Information
          Information always gives meaning for us.

5. What is Database?
Ans : Collection of information belongs to a particular topic (an organization) written in a                             predetermined manner stored at a particular place so, as per easy retrieval.

6. What is DBMS(Data Base Management System)?
Ans : Relationship,s can't be maintained between the tables. Only one user work on DBMS at the                 same time.
          EX : Excel DB

7. What is RDBMS?
Ans : Relationship's can be maintained between the tables. Multiple users work on RDBMS at the                 same time.
          EX : SQL, ORACLE, TERADATA ... etc.

8. How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
Ans : one-to-one relationship can be implemented as a single table and rarely as two tables with                   primary and foreign key relationships.

          one-to-many relationship can be implemented by splitting the data into two tables with                         primary key and foreign key relationships.

           many-to-many relationship can be implemented using a junction table with the keys from both            the tables forming the composite primary key of the junction table.

9. What is difference between DBMS and RDBMS?
Ans : 
DBMS :

  1. DBMS applications store data as file.
  2. In DBMS, data is generally stored in either a hierarchical form or a navigational form.
  3. Normalization is not present in DBMS.
  4. DBMS does not apply any security with regards to data manipulation.
  5. DBMS uses file system to store data, so there will be no relation between the tables.
  6. DBMS has to provide some uniform methods to access the stored information.
  7. DBMS is meant to be fro small organization and deal with small data. it supports single user.
  8. DBMS doesn't support distributed database.
  9. Examples of DBMS are file systems, xml etc.
RDBMS
  1. RDBMS applications store data in a tabular form.
  2. In RDBMS, the tables have an identifier called primary key and the data values are stored in the form of tables.
  3. Normalization is present in RDBMS.
  4. RDBMS defines the integrity constraint for the purpose of ACID (Automocity, Consistency, Isolation and Durability) property.
  5. in RDBMS, data balues are stored in the form of tables, so a relationship between these data values will be stored in the form of a table as well.
  6. RDBMS system supports a tabular structure of the data and a relationship between them to access the stored information.
  7. RDBMS is designed to handle large amount of data. it supports multiple users.
  8. RDBMS supports distributed database.
  9. Example of RDBMS are mysql, postgre, sql server, oracle etc.

10.What is an ER Diagram?
Ans : 1.A Blueprint or pictorial analysis of a database.
          2.A diagram that analyzes how a database can look on the physical level.
             Components of an ER Diagram would be :
             * Entity
             * Attribute
             * Relationship
          3. ER diagram is platform independent.
          4. English form of an ER diagram is called 'Relational Schema'.
              Eg : Emp Details ( e#, Project#, Role , Number-Of-Shares, Shareworth)

11.What is De-normalization?
Ans : Frequently if you are inserting data into database and very rare cases , if you are retrieving the data then using De-normalization concepts, we merge the data multiple tables into one table.

12.What is "normalization"?"Denormalization"? Why do you sometimes want to denormalize?
Ans : To eliminate data redundancy and improve the performance of DB, we go with normalization whenever retrieving the data more frequently from .

13.How will you show many to many relation in SQL?
Ans : create 3rd table with 2 columns which having one to many relation to these tables.

14.What are the benefits of Normalization?
Ans :  Some of the benefits of normalization include :

  • Faster sorting and index creation.
  • Narrower and more compact indexes.
  • Fewer indexes per table, which improves the performance of insert, update and delete statements.
  • Fewer null values and less opportunity for inconsistency, which increase database compactness.


15.What are the disadvantages of Normalization?
Ans : As normalization increases, so do the number and complexity of joins required to retrieve data. Too many complex relational joins between too many tables can hinder performance.

16.What Tool you have used for checking Query Optimization? What is the use of profiler in SQL Server? What is the first thing u look at in a SQL Profiler?
Ans : SQL Profiler is a graphical tool that allows system administrators to monitor events in an instance of Microsoft SQL Server. You can capture and save data about each evebt ti a fuke ir SQL Server table to analyze later. For example, you can monitor a production environment to see which stored procedures is hampering performance by executing too slowly.

Use SQL Profiler to:
Monitor the performance of an instance of SQL Server.
Debug Transact-SQL statements and stored procedures.
Identify slow-executing queries..
 
            Test SQL statements and stored procedures in the developement phase of a project by single stepping through statements to confirm that the code works as expected.
            Troubleshoot problems in SQL Server by capturing events on a production system and replaying them on a test system. This is useful for testing or debugging purposes and allows users to continue using the production system without interference.
           Audit and review activity that occurred on an instance of SQL Server. This allows a security administrator to review any of the auditing events, including the success and failure of a login attempt and the success and failure of permissions in accessing statements and objects.




No comments:

Post a Comment