• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

need opinion/ideia.. multiple databases good or bad ideia?

today i have the human resources database with tables like the employees.. emp address/fones/documents/ and everything related to the employees of the company.. and at the main system we use the employees info from this database to create a login system, where can tell what employee has access to what..

so then came the pcs inventory system where we store all pcs from the company.. then came several others small system such as this one.. and all related tables went to the human resources db..  (since we store info like last employee that modified this/that and stuff like a small ticket system that uses the employee id)

now there is now a kind of big system that will be related to the employees id and such again.. but is it better to make another database for it and then when we need to get the like who did what in this new db will need a join between databases to get it i dont know how good or bad that is..

should we let all system stay at the human resource db or split them all into their own db and make joins between databases to get the info from the employee ??

what i am afraid is that if i keep all system in one db.. it will get very big this db.. not sure if its a good thing..

ps. sorry for my bad english since it isnt my main language
0
eguilherme
Asked:
eguilherme
1 Solution
 
pcelbaCommented:
Databases should be handled as standalone units. They can be backed up and restored independently and to rely on data from another database is risky.

You may store everything in one database but it should not be called HRdatabase. You may split the info in this one database into several schemes but from certain company data size it is better to have more databases.

If you need to port some Employee information from one database to another one you should do it manually when needed. You may set some rules which database is the "primary" data source but you should not use primary key values from one database as primary keys in another database.

The  pcs inventory database can probably contain pcsEmployee table. This table should have its own independent primary key and it should have another column containing HRemployeeCode to keep the reference to the "primary" data source for Employees. Your pcs inventory application can read/update necessary employee info from HR database but it should be designed as independent.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now