Welcome to My Blog.
I am here to share my knowledge and experience through this Blog. I am continually enhancing my researching, writing, problem-solving skills and want to share this journey with you through this blog. I will endeavour to make every post easily understandable with an example wherever possible. I hope you enjoy reading my blog. Positive suggestions and feedbacks are always highly appreciated.
User Defined Functions(UDF) SQL Server allows us to create our own functions called as user defined functions. A function is a stored program that you can pass parameters into and return a value. For example, if we want to perform some calculations then we can place them in separate function and store it in the database. Whenever we need the calculation,
The MERGE statement is used to make changes in one table based on values matched from another. It can be used to combine insert, update, and delete operations into one statement.If you need to perform INSERT, UPDATE and DELETE operations on a TARGET table by matching the records from the SOURCE table Performs insert, update, or delete operations on
A SQL Injection (SQLI) attack consists of insertion or “injection” of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file
An index is used to speed up searching in the SQL Server database. An index can be used to efficiently find all row matching some column in your query and then walk through only that subset of the table to find exact matches similarly to the way a book’s index helps you find information quickly within that book. Indexes
There are 3 types of database files: 1. Data file It is a primary file and starting point of database. This stores all the data. It also points to other files in database. It has an extension .mdf 2. Log file This stores all the transaction log information. All log information used to track and recover database. It
Consider a table with hundreds of columns and millions of records, if your application only really needs a few records, there’s no sense in querying for all the data. It’s a massive waste of resources. Select all from Categories table: SELECT * FROM Categories
A stored procedure is a group of SQL statements that has been created and stored in the database. A stored procedure will accept input parameters so that a single procedure can be used over the network by several clients using different input data. Stored procedures will reduce network traffic and increase the performance. If we modify a stored procedure
A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. Triggers are written to be executed in response to any of the following events: 1. A database manipulation (DML) statement (DELETE, INSERT, or UPDATE) 2. A database definition (DDL) statement (CREATE, ALTER, or DROP). 3. A database operation (SERVERERROR, LOGON, LOGOFF, STARTUP,
Exceptions are a type of error that occurs during the execution of a program which is typically problems that are not expected. C# exception handling is built upon four keywords: try, catch, finally, and throw. 1.try − A try block identifies a block of code for which particular exceptions is activated.There can be one or
Eager Loading For loading the related entities of an entity. Eager Loading helps to load all your needed entities at once. i.e.related objects(child objects) are loaded automatically with its parent object. We use ‘include‘ for eager loading.