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.
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.
In this case I am not giving my codes in blog but you can find it in GitHub. Please follow the following links to find the problem and solution. Again this is not dependent on any particular database technology like I am using MS SQL Server here.
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.
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.