Adding Indexes with EF Migrations

Most business applications use a database. Creating the database in the first place is the easy part. Continously evolving the database schema during development when multiple team members are doing changes in various parts of the database is one of the hard parts. The really hard part is to be able to upgrade – or… Continue reading Adding Indexes with EF Migrations

Using Entity Framework to Create a Database

It’s been a few years since I worked with Entity Framework and there have been substantial improvements. Still I have been missing a life cycle view on the database, where the evolution of a database schema during development and maintenance is fully supported. The latest Entity Framework 4.3 release contains EF Migrations which claims to… Continue reading Using Entity Framework to Create a Database

Database Table Primary Keys

When designing a database, I have a standard of always creating a clustered primary key in each table of type INT IDENTITY(1,1) NOT NULL. CREATE TABLE Cars( ID INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_Cars PRIMARY KEY CLUSTERED, Brand NVARCHAR(20) NOT NULL, RegistrationNumber NVARCHAR(10) NOT NULL, MadeIn NVARCHAR(20) NOT NULL )CREATE TABLE Cars( ID INT IDENTITY(1,1)… Continue reading Database Table Primary Keys