Designing SQL database to represent OO class hierarchy

后端 未结 7 1931
离开以前
离开以前 2020-12-03 00:13

I\'m in the process of converting a class hierarchy to be stored in an SQL database.

Original pseudo code:

abstract class Note
{
   int id;
         


        
7条回答
  •  一向
    一向 (楼主)
    2020-12-03 00:43

    There's a series of patterns collectively known as "Crossing Chasms" I've used for many years. Don't let the references to Smalltalk throw you - it's applicable to any object oriented language. Try the following references:

    A Pattern Language for Relational Databases and Smalltalk
    Crossing Chasms - The Static Patterns
    Crossing Chasms - The Architectural Patterns

    Share and enjoy.

    EDIT

    Wayback Machine links to everything I've been able to find on the Crossing Chasms patterns: http://web.archive.org/web/20040604122702/http://www.ksccary.com/article1.htm http://web.archive.org/web/20040604123327/http://www.ksccary.com/article2.htm http://web.archive.org/web/20040604010736/http://www.ksccary.com/article5.htm http://web.archive.org/web/20030402004741/http://members.aol.com/kgb1001001/Chasms.htm http://web.archive.org/web/20060922233842/http://people.engr.ncsu.edu/efg/591O/s98/lectures/persistent-patterns/chasms.pdf http://web.archive.org/web/20081119235258/http://www.smalltalktraining.com/articles/crossingchasms.htm http://web.archive.org/web/20081120000232/http://www.smalltalktraining.com/articles/staticpatterns.htm

    I've created a Word document which integrates all the above into something resembling a coherent whole, but I don't have a server I can drop it on to make it publicly available. If someone can suggest a free document repository I'd be happy to put the doc up there.

提交回复
热议问题