SHASHANGKA SHEKHAR'S BLOG

#Author #Speaker

What is View?

A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table.

The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.

What is Trigger?

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. Read More

What is Stored Procedure?

A stored procedure is a named group of SQL statements that have been previously created and stored in the server database.

Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version.

Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.

What are different normalization forms?

1NF: Eliminate Repeating Groups
Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.

2NF: Eliminate Redundant Data
If an attribute depends on only part of a multi-valued key, remove it to a separate table.

3NF: Eliminate Columns Not Dependent On Key 
If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key Read More

What is normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases.

In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables.

The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

What is RDBMS?

Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables.

Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of tables.

The History of SQL Server

SQL stands for Structured Query Language and is pronounced either ess-que-el orsequel. It is the language used by relational database management systems (RDBMS) to access and manipulate data and to create, structure and destroy databases and database objects. Read More

Keyboard Shortcuts in SQL

This list displays the keyboard shortcuts available in SQL Query Analyzer.

CTRL+F2 :: Insert or remove a bookmark (toggle).
F2 :: Move to next bookmark.
SHIFT+F2 :: Move to previous bookmark.
ALT+BREAK :: Cancel a query. Read More

Table Variables

Temp variable can be created like this:

Table variable is always useful for less data. If the result set returns a large number of records, we need to go for temp table.