MSSQL

nvarchar(max) vs nvarchar(N) Read in English

MS SQL Server offers several data types for storing strings. The most popular are nvarchar(N) (1 ≤ N ≤ 4000) and nvarchar(max), which allow storing Unicode-encoded string data. Application developers often transfer their experience with the string type from programming languages like C# or Java to databases and automatically choose nvarchar(max), which can store strings up to 2GB. However, databases store and process data in fundamentally different ways. In this article, I will explain and demonstrate the consequences of unjustified use of the nvarchar(max) type.

Read more...

Patterns: Specification Read in English

Specification pattern unites Domain-Driven Design, application architecture modeling and Entity Framework in C#. Specification pattern is designed to order business rules and connect our code to the business terms. This article shows an example of the implementation with Entity Framework.

Read more...

Useful Constraints Read in English

Usually we use constraints to specify the allowable values for the columns in tables. And it works perfectly! But beyond that, constraints help query analyzer to generate more effective query plans. How does it work? Read below.

Read more...