Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 18th, 2009, 07:17 PM
Roushy Roushy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 13 Roushy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?

Reply With Quote
  #2  
Old October 18th, 2009, 08:10 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
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

Reply With Quote
  #3  
Old October 18th, 2009, 11:05 PM
NovaX NovaX is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: Bay Area, California
Posts: 841 NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level)NovaX User rank is General 11st Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 12 h 59 m 16 sec
Reputation Power: 1680
Send a message via ICQ to NovaX Send a message via Yahoo to NovaX Send a message via Google Talk to NovaX
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.

Reply With Quote
  #4  
Old October 19th, 2009, 12:43 PM
jwdonahue's Avatar
jwdonahue jwdonahue is offline
Bellevue WA, USA
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: May 2004
Location: Bellevue Washington, USA
Posts: 3,398 jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level)jwdonahue User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 6 h 48 m 17 sec
Reputation Power: 886
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/

Reply With Quote
  #5  
Old October 19th, 2009, 06:22 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,235 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 27 m 16 sec
Reputation Power: 4445
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Single or Multi Database Format? Need Input!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap