Best Practice for data structure for multi-user systems
Hi,
I would like to know if anyone has had some experience in building systems for multiple end-users.
To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times.
If I wish to offer such a system to many Venues, there are a number of options available.
- Simply create a unique copy of the system for each Venue, in their own Namespace, unique classes and applications
- Set it up, so that every Venue shares the same set of applications (saving to maintain multiple copies), but create unique classes for each Venue
- Just provide one set of classes and applications and simply pre-fix every piece of data with a unique identifier for each Venue. So all the Bookings for example, would be in one large class, but each entry would be tagged with the Venue ID and the code would simply track all the data with the Venue's ID before creating or opening the records for that Venue.
From a maintenance point of view, only one set of classes and applications would make sense, but I'm hesitant in launching into this in fear of getting the data mixed up and allow one Venue to operate on another Venue's data.
So, my interest is in learning from other developer's experiences, if someone has gone down this road, what they chose to implement, how did it go, was the concept good down the road for expansion and would they do things differently, if they had to do it again.
I'm inspired by the likes of Xero Accounting, where you simply complete an application form, log in and immediately, you have a complete system at your disposal. Just by logging in, there does not seem to be a need for building your copy of a database and they manage it, as if you were running your own copy of the application. Seemingly simple. If you just wish to test the software, then close the account, no apparent need for any hands-on intervention form a human. That is the simplicity I would like to achieve.
Anyway, looking forward to some great suggestions.
Thanks,
Rosti.