Why isn't database versioning considered as important as versioning applications?

I recently started using Kiln Source Control for all my VB.NET code projects, and I don’t know how I managed without it!

I was looking for a database management source for all my stored procedures, UDF, etc. However, I found that there is not as much database version control as for my web files.

Why isn't database version control considered as important as my web files? Of course, all the programming in my database is just as important as the code in my files with code and .aspx?

+6
source share
7 answers

The version for managing database objects is important!

However, maybe this is not considered important, because some people see the database only as a tool that helps them? And external tools are (usually) not versioned.

One thing that is hard for me to manage is the release process. Right now we are using svn-related red entry source management. When it's time for release, we do the same as with the rest of the code: merging from one branch to another. Then, for deployment, we use sql to create a diff script between the merged version and the actual database. Besides some minor bugs and beginner mistakes, I think it works well in an environment where there is no downtime (purposefully;)) and which has a high-speed development process (many releases).

+6
source

You can support database artifacts in your version control system. The version control system is for versions of artifacts, and the artifacts can be program code or a database. We used the same VC for code and database.

+1
source

I don't know if or why this is not considered important, but here is a link to something that might help:

http://code.google.com/p/migratordotnet/

+1
source

VCS are designed to store versions of text. They can store binary files, but they are less efficient. And the state of the database itself is not text and cannot even be directly saved as binary. However, you can store SQL code.

one solution is to save a full database dump (SQL or binary), the other is to store sequences of SQL scripts that change one database state to the next. The second approach can be automated in some environments and is called migrations. if you need a separate specific VCS for the database, you may think that migration tools are such VCS.

There are also tools that can compare two database states and create a diff that can change the first state to the second.

+1
source

I believe it depends on whether you manage database changes (e.g. schema changes, migrations mentioned by wRAR), as part of the source code repository, in the form of sql scripts or other formats using other tools or whether you consider it as database management and do it using traditional backup / restore methods.

In my experience so far, although I would not consider database management less important, this happens at a very low frequency compared to actual code changes. Your case is clearly different, but the combination of script files and database tools should take care of this.

+1
source

You can easily connect SQL Server to Kiln using SQL Source Control - http://www.red-gate.com/products/sql-development/sql-source-control/

+1
source

Here is the reality.

Database version control, i.e. DDL, DML, and even the data for the necessary reference data necessary for the application to have basic functionality, is just as important as all other application assets under version control. Databases should never be subject to any special exceptions if their assets (objects and necessary reference data) are considered to be acceptable for version control. Ever.

So why were they? Simply. The tools that make it easy to manage these assets were not always associated with sniffing (in the case of SQL Server, before Visual Studio 2008 was sent using third-party tools from Microsoft), and the tools were different from vendor to vendor. When these tool assemblies are insufficient, if the organization does not begin to eliminate this shortcoming, this shortcoming remains. This is a technical duty, and some organizations do not pay due attention to it because of the time or (unfortunately) skill, when simplification tools do not exist or require the integration of third-party tools into the development workflow.

The worst is trying to bring old projects under version control, as you have to kick and scream with you every time, in addition to selling this business value. I will not disagree that there may be more urgent business needs, but getting the database assets under version control should be somewhere on this list, even if it's a lower priority.

There is no excuse. I struggled with more than project managers, data architects, and even CIOs / directors on this issue - I even decided that disgusts start out of every project I work on. This must be done, and if it is not, then there must be a timeline with which the business will agree, in which it will be done. Those who are against this must be shot in the face, and the survivors need to be shot again.

+1
source

Source: https://habr.com/ru/post/893347/


All Articles