If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Customising a schema for multiple clients

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-23-08, 06:02
kevan kevan is offline
Registered User
 
Join Date: Sep 2005
Posts: 9
Customising a schema for multiple clients

We are developing a system that will be deployed to many clients. Each client will have their own database (we are using MS SQL Server 2000 for the database).

Our problem is how to handle client specific customisations.

Some of the ideas being discussed include

1) For some tables (such as a user details table) provide an admin interface where an administrator (our business analysts) can add fields which modifies the schema directly (resulting in each client database effectively having their own custom schema).

2) Add a set of generic columns (ints, varchars, etc) to relevant tables and use config to define which of these fields are available to each client.

3) Use a generic lookup table strategy that has one table defining the custom fields and types required, and another table that stores the values of the relevant type.

We found a thread related to this over here:
http://discuss.joelonsoftware.com/de...gn.4.319460.16

I have not been able to find much other information about this on the web so was hoping someone may have some experiences to share (or other threads you can point me at).

Thanks
Reply With Quote
  #2 (permalink)  
Old 05-23-08, 06:29
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
1) sounds reasonable, as long as you're not dropping and re-creating on the fly and only adding to the schema.

2) Ewww

3) Double ewww

None of the offerings are ideal, but 1 is the lesser of the three evils in my mind.
It'll be nice to see what the other lot have to say!
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 05-23-08, 10:05
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
1) Ewww

2) Double Ewww

3) Triple Ewww

Whatever happened to becoming an expert in a line of business and offering an application which is complete and follows best practices?

Sigh.

If I absolutely had to do this I'd give the clients the ability to create one-to-one spin-offs of the tables for storing their own data. Once you let them start mucking around with modifying the core tables you enter an administrative nightmare.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #4 (permalink)  
Old 05-23-08, 11:05
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
Then there is always the "Marie Antoinette" (let them eat cake) approach, give them an XML column and have your application treat that column like a black hole... Never, EVER go below the event horizon of an XML column!

-PatP
Reply With Quote
  #5 (permalink)  
Old 05-23-08, 13:01
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
One of the few occasions I might say "Have at it" with XML. Would be preferable to option 3, anyways.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #6 (permalink)  
Old 05-23-08, 17:40
kevan kevan is offline
Registered User
 
Join Date: Sep 2005
Posts: 9
George, you are in favour of a dynamic schema and against the fixed schema approaches. Any particular reason why? I want to go back to the team with justification for the ideas.

Blindman, Pat, thanks. Have not used XML in the database before - will look into it as an option.

These options are only our current thoughts, would be great to have some suggestions on how others might solve this.

Thanks
Reply With Quote
  #7 (permalink)  
Old 05-25-08, 06:53
gregrobbins gregrobbins is offline
Registered User
 
Join Date: May 2008
Posts: 3
We are wrestling with a similar problem in this post: One Huge Database vs. Many Identical Databases .

blindman's comment seems to really hit the nail on the head: Let's build something that's great and that contemplates user customization, even though it means more work at the outset.
Reply With Quote
  #8 (permalink)  
Old 05-25-08, 21:21
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
I am confident that the fact that I said it will be sufficient to convince your team of the proper development strategy.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #9 (permalink)  
Old 05-27-08, 15:13
kevan kevan is offline
Registered User
 
Join Date: Sep 2005
Posts: 9
For anyone interested, the following MSDN article discusses multi tenanted architecture.

http://msdn.microsoft.com/en-us/library/aa479086.aspx
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On