[TYPO3-dev] table joins and TCA
Stig N. Færch
stig at 8620.dk
Mon Mar 13 18:52:00 CET 2006
>> Wouldn't this be the suggested way to do it from a database viewpoint?
>
> The problem with such a DB layout is that you cannot get details for all
> types with on select nicely. You can get easily the main data with a
> select on the main table. You can get main data and details for one type
> with s join. But you would have to do a giant outer join select if you
> need the details for all types.
So what you are saying is, that when we join more than one table to the main
table, we get into problems?
> So I recommend such a layout only for specific applications.
>
> But as you've noticed the TCA only supports relations not "virtual
> records" as implied by your 1:1 relation of main and detail tables.
>
>
> So why don't you use flexforms for your detail data? Flexform are great if
> you need soe extra fields and you set it up so that you have a datasource
> for each record type. Have a look at tt_content:pi_flexform to see how
> it's done.
>
> Of course you cannot select on flexform data. All fields that must be part
> of a where clause must be real DB fields.
I'm not sure that this is the way to go. I might need the where clause on
these fields.
I'm surprised that it will be so difficult to implement something like this.
So my only option would be to add fields to the extension main table. If I
in worst case add 30 fields to the table, should I expect a big perfomance
hit?
Of course if I do this, many many fields will be empty fields.
/Stig
More information about the TYPO3-dev
mailing list