The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Software Design
|
Single or Multi Database Format? Need Input!
Discuss Single or Multi Database Format? Need Input! in the Software Design forum on Dev Shed. Single or Multi Database Format? Need Input! Software design forum discussing design principles and non-language specific algorithms. Get help with logic, algebraic, or relational concepts.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 18th, 2009, 07:17 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 13
Time spent in forums: 1 h 50 m 2 sec
Reputation Power: 0
|
|
|
Single or Multi Database Format? Need Input!
I am developing a web application that will allow companies to register and use the software. My single most concern is the fact that if 1 database gets comprimised I do not want everything to fail. This is my first time developing a multi-company software package. Would creating a database for every company when they sign up be a reasonable design? It would be done on the fly via code. Or, should I stick to a single database with a table for company & ids?
Thoughts?
|

October 18th, 2009, 08:10 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
If you're going to use the same login in the backend to access the different databases, it is pretty much pointless to use different databases, since the attacker can compromise the other databases as well using an appropriate query.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|

October 18th, 2009, 11:05 PM
|
|
Contributing User
|
|
Join Date: Jul 2005
Location: Bay Area, California
|
|
|
The advantage of different databases is reliability (one outage doesn't affect other companies), segmentation, and simplicity. This disadvantage is much greater cost (hardware, people) and reduced productivity (management of servers). Very quickly you'll find that the benefits are theoretical and the liabilities great.
Security is handled by layers to reduce when broken. The application should have security to detect invalid operations. The network should restrict which machines can connect to others, the database can restrict the queries, etc. If you design with security in mind, like you are trying to do, then you can easily put into place the appropriate restrictions to safe-guard the system.
Its far more likely that the multi-database model becomes less secure because it requires too much manual intervention, resulting in poorly chosen passwords and obvious security holes. Its time consuming and costly. Try to automate the on-boarding process as much as possible to remove the human equation and design security into the architecture.
I've seen small companies hit the scalability wall with the per-db model due to its cost. I've seen larger companies hit the scalability wall with a single-db due to performance, but they then move to a sharded model. I've never seen anyone correct coarse and move to a per-db model. The closest was to segment out a very large partner due to their special needs.
|

October 19th, 2009, 12:43 PM
|
 |
Bellevue WA, USA
|
|
Join Date: May 2004
Location: Bellevue Washington, USA
|
|
|
I second most of the previous statements and would add that you should establish and test a backup procedure. Also, if robustness/security is critical, do not put the db on the same machine as the web site (or even at the same location) and deploy some intrusion detection software. You could also resort to clustering.
__________________
My worst nightmare was a pointless infinite loop.
Work in progress; don't poke the curmudgeon!
http://www.odonahue.com/
|

October 19th, 2009, 06:22 PM
|
|
|
|
There are other considerations. If you're planning to host your website, some hosts will charge you per additional database. If you have shared data you'll want to incorporate a single shared database for data that's common for all companies (maybe). You lose a lot of ability to get consolidated statistics and usage data when each customer is in different db's.
Think it out and use a design that best fits your needs. There is no 'one size fits all' solution.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|