Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should we have separate database instance for each developer?

Tags:

What is the best way for developing a database based application? We can have two approaches.

  1. One common database for all the developers.
  2. Separate database for all the developers.

What are the pros and cons of each? And which one is better way?

Edit: More then one developer is supposed to update the database and we already have SqlExpress 2005 on each developer machine.

Edit: Most of us are suggesting a common database. However if one of the dev has modified the code and database schema . He has not committed the code changes but the schema changes has gone to the common database. Will it not possibly break the other developers code.

like image 774
Amitabh Avatar asked May 21 '10 12:05

Amitabh


People also ask

When should you separate databases?

If the data has different back up and recovery requirements, then they are very good candidates for separate databases. That is only half the problem, though. In most environments, backup/recovery is pretty much the same for all databases. It becomes a question of application design.

How many user databases can create an instance?

For SQL Server, the max number of databases you can have on a single SQL Server instance is 32,767.

How many databases can an instance have?

* An instance can mount and open only a single database, ever. * A database may be mounted and opened by one or more instances (using RAC).

Can a database have multiple databases?

Database consolidation is the process of centralizing multiple databases and instances in order to share resources and thus, among other, cut licensing and hardware costs. There are three types of consolidation: Host multiple databases on a single SQL Server instance.


2 Answers

Both -

I like a single database that changes are tested on before going live, or going to a 'formal' test environment. This is your developer's sanity check; it stays up to date with the live system and it makes sure they always consider each others changes. The rule should be that changes don't go on here if they might break something else.

A database per developer is great (even essential) when more than one developer is making updates. It allows them all the development flexibility they want without breaking things for other developers.

The key is to have a process for moving database changes from development through to your live system, and stick to your process.

like image 106
philiphobgen Avatar answered Oct 03 '22 04:10

philiphobgen


Shared database

  • Simpler
  • Less cases of "It works on my machine".
  • Forces integration
  • Issues are found quickly (fail fast)

Individual databases

  • Never affect other developers, but this is also a bad thing, in continuous integration

We use a shared development database and it works out nicely. Our schema rarely changes in a way that makes it backwards incompatible, but occasionally a design change will occur before we go live, and we simply ask the other developers to update.

We do have separate development application (web) servers, but they share the same database. Our developers do have the option to use their own database, as they know how to set this up, and will do that on occasion, but only temporarily. The norm, for us, is to share the database.

like image 24
Marcus Adams Avatar answered Oct 03 '22 02:10

Marcus Adams