How to post a blog entry via e-mail?
Best practices for subclassing entities in relational database
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programming > Best practices for subclassing entities in relational database 9 April 2005 00:00:45

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Best practices for subclassing entities in relational database

Hendy Irawan 9 April 2005 00:00:45
 Hi

What are the best practices for subclassing entities in relational databases?

The most efficient/fastest way is to use one table for all subclasses.
But sometimes this is not very... err... nice. Especially for nicely
complex hierarchy. In the OOP world Everything(tm) can descend from
the Object class. But then do you just create one "objects" table and
then expect every entity to be there?

I'm currently developing a database system with only two entities,
Persons and Topics (things attached to persons, like their e-mail
addresses, books read, movies liked, basically anything and nothing in
general, etc.) Actually persons are also topics in the proper sense of
hierarchy (just like the Topic Map model -- http://www.topicmap­.org),
but when converted to relational it gets messy. The thing is I also
need to add associations between these entities.

And so I have to have relationship entities (person-to-person
relationship), association entities (person-to-topic relationship),
and yet another association entities (topic-to-topic relationship). In
the OOP world I would only need two base classes (topics and
associations), but in the relational world this gets transformed to 5
entities, and more for the many-to-many join tables (i.e. a
association entity has a association types table and a association
many-to-many table).

I would appreciate any suggestions.
--
Hendy Irawan
http://www.gauldong­.net
http://dev.gauldong­.net

--
PHP Database Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PHP web-programming > Best practices for subclassing entities in relational database 9 April 2005 00:00:45

see also:
graphic designer lost in java script
Trouble Coding an Expanding Tree Menu…
AJAX for real?
пройди тесты:
Do you really know yourself?
see also:
Development the Right Systems for…
Super cooler

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .