Mapping from ORM to ER model

M

mmm

Hi everyone,

I tried to map from ORM diagram to ER model but I found that the constraint
I've set on ORM diagram is not mapped!

My facts and constraints are:

1. Student(IdStu) is in University(IdUni) (constraint: each student must be
in 1 univ)

2. Student practices Sport(IdSpo)

3. Student practices Art(IdArt)

The external mandatory constraint on facts 2 and 3 is: every student must
practice Sport or Art.

After mapping, 3 tables created are
1. Student(Student IDStu, Is in University IdUni),
2. Student practices Art(Student IdStu, Art),
3. Student practices Sport(Student IdStu, Sport IdSpo).

There's a relationship from the table "Student practices Art" to "Student"
and a relationship from the table "Student practices Sport" to "Student".

So the problem is this model does not tell us that every student must
practice Art or Sport!

Is it impossible to convert from ORM to ER with full information/constraints?

Thank you very much and awaiting for your reply.
 
S

Scot Becker

Unfortunately, not all ORM constraints get implemented in the ER model.
However, this one appears to be (it is when I generated it). In the database
model diagram, take a look at the code window (Database | View | Code).

If you double click on it, you will see a stored procedure generation
script. You will, however, need to "wire it up" by using that SP when saving
any related data, calling it from insert/update triggers on those tables,
etc.

Hope that helps,
Scot.
................................................
Scot Becker

Orthogonal Software
www.orthogonalsoftware.com

ORM Blog/Portal: www.objectrolemodeling.com

To e-mail me, please use my first name at the domain listed above. All mail
sent to the reply-to address gets routed to a junk e-mail folder where it
will likely be deleted without being read.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top