sql - share datas between 4 websites -


i'm planing webproject, containing 4 websites build in mvc3. databaseserver i'm going use ms sql server.

each of websites have arround 40 tables. of tables shared between websites: contact, cities, postalcodes, countries...

how handle this? should put tables of each database common database (so database of website 1,2,3 , website 4 in 1 databse together). or should create 1 database containing shared datase?

but think i'm getting problems data consitency, because think there no way point 1 database other (linking example citytable in database 1 buldingtable in databse 2).

any ideas? lot!

what splitting out separate databases if each web site has own database, , 1 of web sites gets extremely popular, easy move database different, more powerful database server , not has change except (a) need reference central "control" data remotely (or replicate/mirror/etc), , (b) point web site @ different database server. benefit if 2 web sites have same types of tables (e.g. patients), don't have have tables patients_website1, patients_website2, different stored procedures identical except table names (or ugly dynamic sql procedures paste table name in). separated out can have exact same schema , exact same codebase without having combine everyone's data single table.

if mix data within single database, data consistency easier, , whole setup simpler, splitting out when grow lot tougher. if split out different databases, no won't able enforce referential integrity using standard dri (foreign keys). can accomplish in other ways if important (triggers, validation before insert/update, etc).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -