Recently I have been working with Entity Framework V6 using the Code First Implementation. Code first has been the increasing in popularity, where you define your classes first, and then Entity Framework generates a database with tables modeled after your classes. Code first continues to grow in popularity, and appears to be the primary, or only, technique moving forward into […]
Tag: Editorials
Perfect Code Day 2
When it comes to writing perfect code, it seems Aaron and I have the same opinion. Aaron writes: If have two options; I can write an easily readable and understandable test over a longer piece of code. I cannot write an easy, readable test but the actual code would be shorter and more concise. Under most circumstance I will choose […]
Writing Perfect Code
I recently read a blog about coding style. The premise was that simpler code is better. For example, if you could write a line of code using a lambda expression, it would be better than writing three lines of code using traditional coding techniques. If I were to use that same reasoning, I would be able to say, writing a […]
Decision Support Systems
Is separation of responsibilities always the best solution? Why would I even ask that question? Of course the answer is yes. Except for the fact that separation comes with a cost. Separation takes more time to implement. It makes the application more complicated. And it expects there is going to be a need to modify something in the future…a major […]
Continuous Integration – The Results are In
Continuous integration servers have been around for a long time. It consists of build engines integrated with a source tree, and in a perfect world, has hooks to execute unit tests once a successful build is achieved. With Extreme Programming, tools such as Cruise Control was released in 2001, were adapted to implement this process. Since that time the value […]
Tips to Optimize SQL Server Statistics
While I was doing research into statistics for yesterday’s editorial, I came across some characteristics of how SQL Server works with non-materialized objects and query plans, I felt useful to impart. Many of you probably already know these tips. Some you may have experienced them through trial and error; this may confirm your experience. First of all, objects that are […]
SQL Server Statistics
Statistics, in SQL Server, are very powerful. The query optimizer utilizes statistics to determine the most efficient sequence to process a query. This is pretty common knowledge. Maybe you are not aware of some of the cool capabilities Microsoft has built into statistics. Statistics maintain the distribution of data in a table. They maintain multiple ranges or bands of data […]
Dot Notation Hierarchy
Today I am sharing one last hierarchy technique I have seen in rare instances. It is not the most pure form of an hierarchy and has a number of issues. Still, implementation is simple and quick, and for smaller amounts of data, this works really slick. This last hierarchy method simply uses a single VARCHAR column. In the column, the […]
SQL Server HierarchyID Data Type
Today we continue our series on hierarchy structures in a database. This last implementation I’m sharing is only known to me in SQL Server. Microsoft has implemented a Hierarchy data type, having built in methods for handling relationships between nodes. You can insert a record into the hierarchy as the last node of a parent node, or following a specific […]
A Lesson in Hierarchies
The rest of this week I’m going to take a look at some of the options available to you for creating hierarchical data structures in a relational database. Today we look at a hierarchy built on a linked list through the use of a single table having a self join to a parent node. The table would have a primary […]