More than one self-referenced shared list

16 views
Skip to first unread message

Adela Flamingo

unread,
Oct 28, 2015, 4:48:27 AM10/28/15
to redbeanphp

Hi! I can't find a way to figure this out with RedBean, so I explained the case hoping somebody has a new approach to solve the issue.

I have board games in my database. Those games has different relations between them. A game can be made as a reimplementation of another game (or games). In the other hand, the same game can be reimplemented by more than one games. Also a game can integrate with one or more games. Let's see:

'Papa papa' is the original game. We have another game called 'Twisted Race'
'Papa GrandPa' is based on the original game, as well as 'Mama GrandMa'
'Papa GrandPa' and 'Mama GrandMa' integrates with each other, being able to play with both games at the same time
'GrandPa Twisted' is based on 'Papa GrandPa' and 'Twisted Race' and integrates with 'Twisted Race', but not the others

So, I have it clear in mind, without using Red Bean:

table_game : (game_id, name)
table_game_reimplementations : (reimplemented_by_game_id, reimplementation_game_id)
table_game_integrations : (game_id, integration_game_id)

How can I achieve this in Red Bean??

Thanks in advance

François Leblanc

unread,
Oct 28, 2015, 2:44:28 PM10/28/15
to redbeanphp
Don't be sure about your problem, but it sound like tree problem.
In my case I use oqgraph to manage it, with mariadb database and R::exec + convertToBean.

Maybe this help you.
Regards

Reply all
Reply to author
Forward
0 new messages