[Typo3-dev] database relations in TYPO3

Ries van Twisk typo3 at rvt.dds.nl
Wed Nov 16 16:48:05 CET 2005


Dmitry Dulepov wrote:

>Hi!
>
>Ries van Twisk wrote:
>  
>
>>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.
>>    
>>
>
>You do not need to call it many times with existing solution if database
>supports nested SELECTs (see below).
>
>  
>
>>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.
>>    
>>
>
>...if database supports it. MySQL 3.23 does not. It does not support
>nested queries either, so
>	select * from sometable where uid in
>		(select relation_field from anothertable)
>is impossible too.
>
>There are still many 3.23 installations around.
>
>Dmitry.
>_______________________________________________
>  
>
Appart from that there is not a good excuss anymore for running a flat 
table database like  Mysql 3.x AND
I think that typo3 developmens need to forget about supporting Mysql 
3.x, like not supporting php 3.x anymore
(infact 4.0.x is not supported anymore).

Also it's not about nested querys, it's about relations between tables.

select * from sometable where uid in
		(select relation_field from anothertable)

The above query is not even possible with typo3 because of that blob field and 'virtual' relations.
i think that typo3_div (not sure) holds functions for creating the right where clause to simulate the above.
BUT I believe there are ideas to make kicksters default to make MM relations.


Ries





More information about the TYPO3-dev mailing list