开发者

Creating an object relational schema from a Class diagram

I'd like some help converting the following UML diagram:

UML Diagram

The diagram shows 4 classes and is related to a Loyalty card scheme for an imaginary supermarket.

I'd like to create an ob开发者_开发知识库ject relational data base schema from it for use with Oracle 10g/11g. Not sure where to begin, if somebody could give me a head start that would be great.

Looking for actually starting the schema, show abstraction, constraints, types(subtypes, supertypes) methods and functions.

Note: I'm not looking for anyone to make any comments regarding the actual classes and whether changes should be made to the Diagram, just the schema.

Thanks


You are talking about how to create the mapping between the database and your object oriented design. This is a big topic and you will encounter what is called the impedance mismatch. A google search on "impedance mismatch" will give many pointers to documentation.

A nice starting place is this blog post a-journey-with-domain-driven-design-and-nhibernate which discusses to create a table per class, a table per class hierarchy or create a table per subclass. Looking at your design you also have to make this design decision.


Perhaps an ORM mapping tool such as NHibernate could save you this headache of organizing your DBRM?

Otherwise, I would ask for more details about what you're trying to achieve so that I may help you further, perhaps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜