[TYPO3-core] RFC: Bidirectioanl MM relations

Kasper Skårhøj kasper2006 at typo3.com
Mon Sep 11 12:33:05 CEST 2006


Hi Franz,

A basic principle in TYPO3 is that a record needs a uid as the unique  
identifier to be edited. TYPO3 doesn't care if that is in fact a  
redundant identifier to a combination of other database fields. So  
TYPO3 will have its way and you will not have yours, no matter how  
more "correct" it is.

- kasper

On Sep 8, 2006, at 17:25 , Franz Holzinger wrote:

> Hello Ingmar,
>
>> Franz Holzinger wrote:
>>> Hello Kasper,
>>>
>>> it would be possible to integrate a 'pid' into mm tables as well.
>>> However it would not make sense to introduce a 'uid' into a mm  
>>> table. So
>>> we need some flexibility instead of a new column 'uid' for a mm  
>>> table.
>>
>> You can simply give it a uid column as well, there's no problem  
>> with it.
>>
> no, there could occur problems with that.
>
> Usually mm tables get created and deleted frequently. If you assign a
> new relation you have a record with 'uid_local' and 'uid_foreign'. But
> when you have an additional 'uid' which is the key, then this 'uid'  
> will
> always get incremented.
> Then you delete the relation and the record gets deleted. Then you
> recreate it with the same 'uid_local' and 'uid_foreign', but the uid
> will be different from before. This means that you can never rely  
> on the
> 'uid' if you want to form MYSQL queries. But then the uid is a useless
> key. And this would be against the rules of database normalization. We
> would have 2 keys: uid and (uid_local, uid_foreign). This would  
> decrease
> the performance unnecessarily.
>
> Greets,
>
> Franz
>
>
>
>
>
>
>
>
>
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core



- kasper

"Gimme Five!"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3






More information about the TYPO3-team-core mailing list