This is a migrated thread and some comments may be shown as answers.

Question about relations, identity etc.

2 Answers 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Plomp
Top achievements
Rank 2
Daniel Plomp asked on 13 Oct 2010, 02:32 PM
Hi,

I'm quite new to ORM and have the following challenge ahead of me:

I have to work with a SQL Server 2005 database within a Sitefinity Project. (3.7)
This database contains personal information, addresses etc.

The database is generated by some sort of tool that builds the database and a Windows Forms application to maintain it. I have to be able to read and write from the database from my Sitefinity project.

Questions
1. The database has no relations defined inside SQL Server. Can I have full advantage of ORM if there are no relation or do I have to manually create associations first? And... will all this LINQ stuff work when I do this?

2. All the Identity columns get there identity from a seperate table. So for each entity I will have to manually get a unique number from the database and after that update this seperate table. So actually a manual identity seed mechanism. Will this work?

3. The database will be on a seperate server. So my website will have a remote connection to this database server. Is there something I should do to make this work with ORM? Maybe caching and transactions?

Just like to know if these issues will be a real problem in ORM.

Thanks,
Daniel

2 Answers, 1 is accepted

Sort by
0
Petko_I
Telerik team
answered on 18 Oct 2010, 06:35 PM
Hi Daniel,

Let’s discuss your questions one by one in the order you asked them

OpenAccess can handle a case in which you have associations only in the conceptual model without having constraints in the database. You can use LINQ without problems with such a scenario. The only thing you need to do is define your associations with the visual designer. Even if you do not have primary keys defined on your tables, our validation framework will help you resolve the conflicts.

I also do not think you will encounter issues with the identity mechanism you have specified. As far as I understand the identity seed is not defined on the entity table but on the common table where all the identities reside. There should not be any obstacle to get the generated id and set it to an entity in another table.

Working on a separate server is fine – in most of the real-case scenarios the deployment of the database is on a dedicated server. A valid connection string is the only thing you need to get your application running. However, in order to improve performance you can benefit of the L2 caching mechanism we provide. In short, it helps you cache persistent objects in a common in-memory pool used by several threads. This way the database connections are opened more sparingly and working in-memory with cached objects is preferred.

If you have any doubts or questions feel free to contact us and we will try to respond quickly and thoroughly.

All the best,
Petko_I
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel Plomp
Top achievements
Rank 2
answered on 20 Oct 2010, 10:56 AM
Thanks. I will take a look into it and give it a try!

Thanks,
Daniel
Tags
General Discussions
Asked by
Daniel Plomp
Top achievements
Rank 2
Answers by
Petko_I
Telerik team
Daniel Plomp
Top achievements
Rank 2
Share this question
or