Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It's not clear how data consistency is provided for different branches.

We have a large knowledgebase which is filled by the experts and delivered as updates to our clients. This data is also used for testing the product.

But if we have quite a few feature branches (being developed in parallel) and each feature requires its own slightly different db schema won't it be a hell?

Definitely some way of populating all DBs from one centralized store must exist. And here comes the question? What are these methods?

Now the only solution I see is to create some mapping mechanism and to save mappings in the corresponding DB, yet I believe more elegant approaches exist.

Update:

To clarify the problem.
We have one (let's call it master db). And N databases with slightly 'narrower' schemas comparing to the chema of master. I.e. master is has the richest schema: other dbs have fewer tables/columns.

share|improve this question
    
Would totally depend on the kind of differences. Is this mainly old versions vs. new versions (so update possible). Or are there versions with very different tables? –  thorsten müller Apr 22 '13 at 12:03
    
I updated my question. –  voroninp Apr 22 '13 at 12:11
add comment

1 Answer

Your database build and schema changes need to be under source control. Instead of shipping a database file with the knowledge base data already in it, have a separate build that will do an import of the knowledge data after the database is built or altered. The source of the data could be from text/xml files.

The import scripts would also be under source control since they have to handle the particular schema for this branch.

This is going to be sort of a hell if you don't get it under control and automated. If it were easy, everybody would be doing it.

share|improve this answer
    
That is how it looks now. But the sad truth is that features appear faster than we write scripts. Entity Framework looks a bit promising because we already use it. I'm interested in using it for solving this poblem by providing different MSL and SSDL descriptions for each DB. Though it can happen that editing large XMLs is not easier than writing scripts =) –  voroninp Apr 22 '13 at 12:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.