php - One Database or multiple Databases -
so, today had long conversation in company between project leader , programmers, shall run 1 db tables in our new project or run multiple databases each db storing 1 set of module.
project shop, have separate (lets phone call modules) such users, payment methods, products, statistics.
now 1 side said should place of within 1 db(its standard procedure) because faster, 1 query can data, while other side said should split between multiple databases more secure, if breaches within products, wont see users tables db on different server or virtual machine.
so question is, pros , cons of having single db info vs having multiple databases. read few questions on stack-overflow, none of them exactly pros , cons. , if having multiple databases slower, how speed up?
thanks!
rather providing generic pros/cons (because depends on utilize case...), tend prematurely optimize systems while optimization shouldn't problem in future, if whole scheme architected refactoring in mind.
imho, had same give-and-take time ago , conclusion starting single database. simplifies lot of details:
single database backup, less maintainance. you don't need manage multiple connections. multiple databases can break chance perform atomic transactions, feature never throw away. you avoid synchronizing 2 or more databases avoid integrity problems.also, since we're in cloud computing era, infrastructures should scale horizontally. is, if need more power, add together replication node , distribute load across multiple servers instead of scaling in application level. ensures software still easy maintain , develop, , solutions should scale out if code has quality and, of course, you've budget back upwards increased load!
php mysql sql database hierarchical-data
No comments:
Post a Comment