Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 What is polymorphic table?

Author  Topic 

devenoza
Starting Member

14 Posts

Posted - 2011-07-17 : 18:27:11
Hi Does anyone have an idea What’s a polymorphic table. I googled it but couldn't find satisfied answer.

Thanks in advance.

-Deven

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-07-18 : 04:30:35
This would be an EAV model. So vertical tables. Easy to put data into, difficult to retrieve.

Some explanations:

http://weblogs.sqlteam.com/davidm/articles/12117.aspx

http://en.wikipedia.org/wiki/Entity-attribute-value_model

http://ycmi.med.yale.edu/nadkarni/eav_cr_frame.htm



Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2011-07-18 : 04:58:03
quote:
Originally posted by devenoza

Hi Does anyone have an idea What’s a polymorphic table. I googled it but couldn't find satisfied answer.

Thanks in advance.

-Deven


It's a performance problem waiting to happen.....

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-07-18 : 05:44:42
quote:
Originally posted by Transact Charlie
It's a performance problem waiting to happen.....

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION



A much more eloquent answer than mine. I like..
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2011-07-18 : 08:24:40
I am not familiar with the term polymorphism used in SQL context, but if it is intended to convey the same meaning and design paradigm as polymorphism in the OO context, that does not seem like EAV. I would have thought polymorphism in SQL is more like what is described in this article.

If that indeed is the case, that seems like a perfectly reasonable design to me. I can be convinced otherwise, but I don't see anything wrong with that design in a SQL database.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-07-18 : 09:06:33
There's also table inheritance: http://www.postgresql.org/docs/9.0/static/ddl-inherit.html

Well, maybe, not sure if that's what you want. It's also not available in SQL Server.
Go to Top of Page
   

- Advertisement -