Foreign Key Constraint to better performance

At the time of software development, we usually do various types of input validations. At web application client end, at server end, at business logic, at database layer etc. To validate input data at database label is done with database constraints. By using this we can prevent invalid data to enter in database and thus to keep our database in a good state. Database constraints are many types. Primary Key, Foreign Key, Check, Default and Unique.

Continue reading “Foreign Key Constraint to better performance”

Create SQL Server store procedure with .NET Framework

We can create store procedures, user defined functions, user defined data types with T-SQL in SQL Server. But T-SQL has limited support and optimization for our business logic implementation. I am not a big fan to write business logic in SQL Server, though some times we need to write some critical logic in SQL Server. For such kind of job or for heavy calculation oriented job T-SQL is not optimized and some time not capable. For that case SQL Server gives us an another option to develop for SQL Server. We can use .NET Framework to build them. Being a Microsoft product SQL Server has support for .NET assembly. But keep in mind that we should use .NET Framework only for that jobs which can not be done using T-SQL. For an quick example you can use regular expression functionality of .NET Framework in SQL Server because SQL Server do not have regular expression support natively. If we use this for simple task which easily can be done using T-SQL then it will be a performance issue. So make decision carefully depending on your situation.

Continue reading “Create SQL Server store procedure with .NET Framework”

Database problem – Lesson 4

Few days ago I got a series of RDBMS related problems for practice. I thought that I should solve them and return. After write some code I change my idea and now I am sharing them with all of my readers. It is always best to write a blog post than mail. The blog post is public and you can share your ideas publicly and if needed you can share the post link to some one privately.

Continue reading “Database problem – Lesson 4”

Personal DVD collection database

Today I am creating a series of problem and solution. It can be on various subjects. At this moment I am starting with database design. From internet I found some database related problem in which you have to solve the domain design with relational database concept. In my blog I want to share some of these problems with my solution. Please feel free to download the code and review the solution.

Continue reading “Personal DVD collection database”