
While doing this I have examined most of these tables, and I have noticed alot of unused or inactive fields and a few tables too. Would reporting these be of any interest to the devs, or is the DB schema frozen for 1.5?
It is currently Sun Jul 20, 2008 10:45 am
Moderators: dam-man, willebil, tcp







WOW! 



Scribe wrote:How do you determine the foreign key relationships with out any foreign key declarations in the sql file






select * from jos_mycomponent as a left join jos_categories as b ON a.catid = b.id
SELECT *
FROM jos_mycomponent AS mycomp
LEFT JOIN jos_categories AS cats ON mycomp.catid = cats.id

Scribe wrote:Yeah it seems pretty powerful but I'm still learning. I still want to experiment with foreign keys defined in the table create statements and then see if DB Designer can geneate the relationship diagram by itself.
If that works, does it seem like it would be worthwhile to add the foreign key definitions back into the table creates so this type of drawing could be generated automatically? I know that's kind of putting the cart before the horse but it might make it easier for 3PDs to actually have the foreign keys defined in the joomla.sql file.



In MySQL Server 3.23.44 and up, the InnoDB storage engine supports checking of foreign key constraints, including CASCADE, ON DELETE, and ON UPDATE. See Section 14.2.6.4, “FOREIGN KEY Constraints” (...) At a later stage, foreign key constraints will be implemented for MyISAM tables as well.





torkil wrote:I love this discussion.
jos_content
-----------------
id (PK)
category_id (FK)
title
introtext
content
blabla
jos_category
------------------
id (PK)
section_id (FK)
name
title

torkil wrote:And: If you do like Amy and use aliases like "a" and "b", then you will definitely benefit from reading "a.id" and "b.category_id" as opposed to "a.category_id" and "b.category_id", which are much harder to tell apart.
Wow!





Users browsing this forum: No registered users and 4 guests