What is normalization?
Normalization is the basic concept used in designing a database. Its nothing but, an advise given to the database to have minimal repetition of data, highly structured, highly secured, easy to retrieve. In high level definition, the Process of organizing data into tables is referred to as normalization.
What is a stored procedure:
Stored procedures are precompiled T-SQL statements combined to perform a single task of several tasks. Its basically like a Macro so when you invoke the Stored procedure, you actually run a set of statements. As, its precompiled statement, execution of Stored procedure is compatatively high when compared to an ordinary T-SQL statement.
What is the difference between UNION ALL Statement and UNION ?
The main difference between UNION ALL statement and UNION is UNION All statement is much faster than UNION,the reason behind this is that because UNION ALL statement does not look for duplicate rows, but on the other hand UNION statement does look for duplicate rows, whether or not they exist.
Example for Stored Procedure?
They are three kinds of stored procedures,1.System stored procedure – Start with sp_2. User defined stored procedure – SP created by the user.3. Extended stored procedure – SP used to invoke a process in the external systems.Example for system stored proceduresp_helpdb - Database and its propertiessp_who2 – Gives details about the current user connected to your system. sp_renamedb – Enable you to rename your database
What is a trigger?
Triggers are precompiled statements similar to Stored Procedure. It will automatically invoke for a particular operation. Triggers are basically used to implement business rules.
What is a view?
If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.
What is an Index?
When queries are run against a db, an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.
What are the types of indexes available with SQL Server?
There are basically two types of indexes that we use with the SQL ServerClustered -
1. It will format the entire table, inturn physically sort the table.
2. Only one clustered index can be created for a table.
3. Data will be located in the leaf level.
4. By default, primary key will create clustered index on the table.
Non-Clustered Index
1. It wont touch the structure of the table.
2. It forms an index table as reference to the exact data.
3. A reference to the data will be located in the leaf level.
4. For a table, we can create 249 non clustered index.
Happy Learning!!!
Regards,
Venkatesan Prabu .J
6 comments:
Hi Venkat,
Im Sundar. First, I would like to say thanks. Then sorry, i cant understand ur code. Can you explain clear?
And one more things is i have more than 150 tables in my office. so i cant write this for 150 tables. so I need one code for all my 150 tables.
Thanks a lot.
Hi Venkat,
Im Sundar. First, I would like to say thanks. Then im sorry, I cant understand ur code. Can u explain clear?
And one more thing is i have more than 150 tables in my office. I cant write this code for 150 tables. So i need one code it will affact all my 150 tables. Can u help me?
Thanks for writing your feedback in my blog.
Ok, Let me explain you about the article.
Magic tables are inherent property of a trigger.
Suppose considering am writing a trigger to update a row.
Suddenly, I thought like, I need my old value. Is it possible to retrieve it?
Yup, Its possible by using Magic tables. The old value get stored in the magic table.
If we run the second trigger the second trigger data will get stored into the magic table.
Any suggestions, feedback... or if you want more info.. please let me know.
Regards,
Venkatesan prabu .J
Thanks Venkat
asking about to explain the query what you have written. Not, what is Magic table!
what is that VENKAToutput and so many variables you used there.
please explain in detail line by line
Thanks
Kalyan
Thanks Venkat,
God Bless U
Take Care n
Keep Smiling
Warm Regards
Sagar Vernekar
Software Engineer
Mob - +91-9881640866
hi Venkatesan prabu,
really this is very nice.because we have all information data which have been update or delete from table.
Post a Comment