# A general implementation question

**URL:** <https://www.ruby-forum.com/t/a-general-implementation-question/146781>\
**Category:** Rails\
**Created:** [August 25, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/a-general-implementation-question/146781 "2008-08-25T12:57:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [August 25, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/a-general-implementation-question/146781/1 "2008-08-25T12:57:12Z")

</div>

Hi  
I have the models ServiceDesk and Problem .A servicedesk can be  
related to other service desk and problems .Similarly a problem can be  
related to other problem and servicedesks .At the first stage when  
doing service desk module I solved the servicedesk related records with  
the table  
service\_desk\_related records with fields  
id  
service\_desk\_id | integer |  
related\_record\_id | integer |  
related\_record\_model | character varying(80) | default  
NULL::character varying  
related\_record\_association\_type\_id | integer |

```
 For example

```

1 12 Problem 4  
2 15 ServiceDesk 3  
So now I have problem module started…So my question  
is shud i create a table name problem\_related\_records as of fields above  
or is there any other easy solution for this

Thanks in advance  
Sijo

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [August 25, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/a-general-implementation-question/146781/2 "2008-08-25T14:36:14Z")

</div>

On 25 Aug 2008, at 11:57, Sijo Kg wrote:

> service\_desk\_id | integer |  
> above  
> or is there any other easy solution for this

Seems like you’ve reinvented polymorphic associations 🙂

Fred
