This is a discussion on "Large-scale, multi-use database design" within the Databases section. This forum, and the thread "Large-scale, multi-use database design are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Large-scale, multi-use database design
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
I'm working on a project that has snowballed and I'm running into db issues that I never expected to face...
The client is opening a health spa. Multiple services will be offered - massage therapy, acupuncture, chiropractic, nutritionist, etc. - all provided by individual practitioners. The goal is that the sum will be greater than the individual parts by making it feel to the customer as though it's a single, cohesive, comprehensive facility. There will be centralized reception and scheduling and various other points of integration, probably including billing. One of the main goals of all this is for the various practitioners to help each other succeed through cross-promotion. Because of this, I assumed a centralized database for all parties. Initially I designed a schema with a "business unit" field in various tables (products, services, appointments, etc.), using additional tables as necessary for proper normalization. But it doesn't feel right. But given the desire for cross-promotion and integration, multiple databases seems out of the question. My latest thought is to use common clients/accounts tables and duplicate other tables using some naming convention like services_massage, transactions_chiro, products_nutri, etc. Comments? Better ideas? Thanks in advance! |
|
|
|
||||
|
Re: Large-scale, multi-use database design
You were doing great with normalization in mind but your latest thought is bad bad BAD!
This is what in my experience is the most appropriate approach: - Add more fields and tables to ensure normalization: Use an additional field to filter products/services belonging to a certain department. eg.: DEPT(dept_id,name,description,whatever) SERVICE(service_id,dept_id,name,description,price) PRODUCT(product_id,dept_id,name,description,price) Then, instead of a 'services_massage' table, you'll have to use a query to find records in the services table that 'belong to' the 'massage' department. eg:
Once you've done the above, you can create views to make your life easier. eg.:
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: Large-scale, multi-use database design
So I was barking up the right tree to begin with! It just seemed (never having done anything like this before) that the schema looked pretty funky with all those BU_ID fields. It makes a lot more sens, though, when you factor in the views.
Thanks for the help! |
|
||||
|
Re: Large-scale, multi-use database design
No worries
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
![]() |
| Tags |
| database, scalability |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-league and Multi-tiered team schedule | overkil6 | Website Planning | 3 | Jun 17th, 2008 22:04 |
| Seeking Advice for Multi-Language website design | jssaggu | Scripts and Online Services | 0 | Jun 1st, 2007 20:44 |
| Scale/Zoom with AS | PixelLuv | Flash & Multimedia Forum | 8 | Mar 9th, 2007 22:26 |
| Interactive Scale - Please vote! | masonbarge | Free Web Site Critique | 7 | Jan 11th, 2007 15:04 |
| Database Design Help | gustava32 | Databases | 2 | Nov 3rd, 2006 16:04 |