Tag Database

How to Assert Database State?

Today, we'll discuss a question that relates to my Unit Testing book: how to assert the state of the database?

Should you Abstract the Database?

This article is inspired by a tweet that I thought would be a good topic for discussion: should you abstract your database?

Entity Identity vs Database Primary Key

Today, we’ll discuss the difference between identity in the DDD sense and database primary keys. We often mix the two together but are they really the same thing?

OOP, FP, and object-relational impedance mismatch

Today’s topic is gonna be about OOP, FP, and object-relational impedance mismatch. The goal of this article is to show how object-oriented and functional paradigms deal with relational data stores.

Database Delivery Best Practices Pluralsight course

My new course Database Delivery Best Practices for Pluralsight went live. Database Delivery Best Practices Database delivery is still something many programmers struggle with. It’s not always clear how to deal with the database schema differences in different environments, how to resolve merge conflicts that inevitably arise when more than one programmer works with the DB, how to make sure you don’t break the other teams' applications when you refactor the database structure and so on.

Reference data as code

In this article, I’d like to write about a powerful technique that can potentially save you a lot of work and make your code much more concise: representing reference data as code.

KISS vs database normalization

In this article, I’d like to share an example of how the KISS principle can go against the database normalization principles and how to make a choice in such situation. The example Some time ago, I had a task which required me to implement linkage between the users of an application and their social accounts. At the time, we planned to add only two social providers - Facebook and Google - but others could be potentially integrated as well in the future.

Domain-centric vs data-centric approaches to software development

In this post, I’d like to make a comparison of two approaches that prevail in the world of (mostly enterprise) software development: domain-centric and data-centric. If you read my last post (or any other post, quite frankly), you might have noticed I personally gravitate towards the domain-centric approach. Although this article is intended to be an impartial one, keep in mind that my bias can leak out. Domain-centric vs data-centric approaches The main difference between the two approaches is in the way people adhering to them treat software.

Is SQL a good place for business logic?

<TL;DR> No, it isn’t. While SQL is a Turing-complete language and we can use it to encode any business logic we want, placing business (domain) logic into SQL leads to a less maintainable solution comparing to one that uses an OO or functional language. Because of that, I advocate to limit the use of SQL to read-only queries (which can potentially contain business logic, that’s fine) and simple CRUD statements where possible.

SQL vs NoSQL: you do want to have a relational storage by default

The concept of NoSQL databases has been around for a while, but there still are quite a few misunderstandings regarding the topic of relational SQL vs NoSQL databases. In this post, I’d like to clarify the most common misconceptions and discuss the primary use cases for each of them.