This question is locked. New answers and comments are not allowed.
Hi. I am new at ORM also web design. and i want to ask something about cross-database relations.
i am going to use mvc3, sqlserver2008express, openaccess ORM to build new trail very small social web site to learn. i will use sqlmembership provider for membership. and there will be another database for site applications (user input,vs) like sitedb.
Sitedb.user table include extra information about user like adress,choicies(username:user.identity.name), etc and relations about other siteDB tables(like post).
the question is, how can be managed these databases relations (aspnetDB.user&siteDB.user) with openaccess ORM. how can i manage relations these different databases tables (aspnetDB.user&siteDB.user).
if cross-database relations is possible, i think there is two alternative.
a)if i start with model-first for sitedb, i have to create model and then database then define cross-database relation between these two databases(aspnetDB.user&siteDB.user) relations, and then i have to use database-first approach(reverse) again to update site models.
b)if i start with database-first approach, i have to define database and define cross-database relation between these two databases and
i have to use database-first approach(reverse) to create site models.
if there is another approach for this situation without cross-database relations what is it.
c)for example : sitedb.user table has own primery key independent from aspnetDB.user table and has uniquie constraint to username value taken from user.identity.name and all site application relate with siteDB.user.
this alternatives is just my thinking and i dont know these approach is true. what would you suggest at this situation.
this was a bit long message, excuse me.
thank you very much.
i am going to use mvc3, sqlserver2008express, openaccess ORM to build new trail very small social web site to learn. i will use sqlmembership provider for membership. and there will be another database for site applications (user input,vs) like sitedb.
Sitedb.user table include extra information about user like adress,choicies(username:user.identity.name), etc and relations about other siteDB tables(like post).
the question is, how can be managed these databases relations (aspnetDB.user&siteDB.user) with openaccess ORM. how can i manage relations these different databases tables (aspnetDB.user&siteDB.user).
if cross-database relations is possible, i think there is two alternative.
a)if i start with model-first for sitedb, i have to create model and then database then define cross-database relation between these two databases(aspnetDB.user&siteDB.user) relations, and then i have to use database-first approach(reverse) again to update site models.
b)if i start with database-first approach, i have to define database and define cross-database relation between these two databases and
i have to use database-first approach(reverse) to create site models.
if there is another approach for this situation without cross-database relations what is it.
c)for example : sitedb.user table has own primery key independent from aspnetDB.user table and has uniquie constraint to username value taken from user.identity.name and all site application relate with siteDB.user.
this alternatives is just my thinking and i dont know these approach is true. what would you suggest at this situation.
this was a bit long message, excuse me.
thank you very much.