Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Can Fuel's ORM handle this database design?
  • I'm wondering if Fuel ORM can handle the design described here: http://www.codeproject.com/KB/aspnet/LocalizedSamplePart2/normalizedSchema.gif The following SQL, or maybe something similar, must be generated and executed: SELECT CultureId
    FROM Culture WHERE CultureName = @CultureName SELECT I.ItemId, IL.[Name], IL.[Description],
    I.Price, CL.[Name], CL.[Description]
    FROM Item I
    INNER JOIN Item_Locale IL ON I.ItemId = IL.ItemID AND IL.CultureId = @CultureIdD
    INNER JOIN Category C ON I.CategoryId = C.CategoryId
    INNER JOIN Category_Locale CL ON C.CategoryID = CL.CategoryId AND CL.CultureId = @cultureId
    WHERE I.SellerId = @SellerID Or I must use normal queries? Please advise.
  • If it's the number of relationships that concerns you, then most certainly, the ORM will handle that. I have had more relationships than that among tables in FuelPHP. I mean this comes down to the ultimate trade-off of development speed vs. performance speed (shaving milliseconds). If you need a very optimized system (scaling, mission critical, etc) then run as natural queries:
    $your_query = DB::query('SELECT id, this, that FROM `table_name`');
    $your_query->execute(); Or the Active Record-ish implementation will achieve much of the same effect. Though I must agree that sometimes natural queries feel better.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • AE7 December 2011