[Typo3-dev] database relations in TYPO3

Ries van Twisk typo3 at rvt.dds.nl
Wed Nov 16 15:22:49 CET 2005


bas at extranet.kompas-media.nl wrote:

>>>You cannot put multiple relations in int field. So, blog is for multiple
>>>relations (though I would prefer text). And I think blog is used in case
>>>of single relations just to simplify the code (i.e. handle all types of
>>>relations in one place).
>>>
>>>Dmitry.
>>>_______________________________________________
>>>
>>>
>>>      
>>>
>>I sometimes change them from blob to text in phhmyadmin just to read the
>>content.
>>There are however typo3 functions to work with these 'virtual' relations.
>>Can't remember them....
>>I think it's planned for typo3 version 5 to start with real database
>>relations?
>>Kicksters does have some functionality for that already called MM
>>relation tables.
>>
>>Ries
>>
>>
>>_______________________________________________
>>Typo3-dev mailing list
>>Typo3-dev at lists.netfielders.de
>>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>>
>>    
>>
>
>Currently I've only seen the BLOBs contain comma separated lists of uid's
>in extensions I build. These are easy to fetch and then use explode() on
>them to populate an array with the individual related UID's. Works like a
>charm for me, but I may be missing something..
>
>Regards,
>
>Bas
>
>_______________________________________________
>  
>
The advantage of having real database relations is that in general 
retreiving large data structures is faster
then calling the RDBM over and over again.
Also you can easely make relations in such a way that you can delete 
releated record automaticly,
or use triggers to set a 'deleted' bit on a field. It keeps the database 
consistend.
However, the kickstarter is capable of create MM tables to create mm 
relations if needed.
I didn't see that it's creates a real relation between tables though.....
Joe Celko made some exellent books about this subject.

Ries





More information about the TYPO3-dev mailing list