Combine 2 apps into one DB?
I'm debating whether to use the same DB for both my blog and my wiki. Since both are open source, and both install the required tables which is a very small number of tables for both apps, I'm thinking about just using one database to represent both sets of tables.
Is this common and safe to do? I am hesitant because I always create a new DB for every application I create or use. But in this case, I don't want to spend another $10 a month from my shared hosting just to get another SQL 2008 DB to host a wiki..it's small and I'm the only one using the wiki. I just want to point the wiki to my existing blog DB that's already running and have the wiki wizard auto gen the tables to that DB and just hold both sets of tables there.
Some software offers the choice to set up a table prefix for all the tables the application requires for this very reason. If this is not available to you for at least one of the applications, then you run the risk of object name collisions.
Not unless you have control of the applications. They are very likely to have name collisions now or in the future. If they used stored procedures exclusively, it is conceivable that you could control everything at that layer to disambiguate table names or ensure each kept to its own schema.
If you were designing the systems yourself, you would probably use the SCHEMA features of SQL Server 2005 and up in order to group your database objects logically, and thus they would not step on each other.
It is common practice to use multiple schemas. There are no object name collisions when your tables are not fully qualified.
Using multiple schemas shares resource overhead (each RDBMS instance takes memory and fixed disk). It is overkill to run separate SQL Server or Oracle instances on the same box if the databases are small.
Also it is common to have multiple "tenants" on a database. Each has their own dedicated schema, sometimes for the same app.