Welcome Guest, Not a member yet? Register   Sign In
Newbie confusion about the database docs
#22

[eluser]Colin Williams[/eluser]
Quote:What is considered best practices for this sort of thing in CI?

There is no best practice particular to CI for storing data objects. Database design and data normalization are skills a developer should pick up along the way.

Quote:Do people spend a lot of time elaborately laying out complicated table structures manually linking one table to another, etc., just to design each object? That would take a lot of development time.

Not a lot of time, no. Let's say you have two data objects which share a many-to-many relationship. At most you're designing and creating 3 tables. Something like post, category, and post_category to link them. Then in your model, you're just doing a JOIN query and then probably looping through the result and concatenating it into just an array of 'post' objects each with a 'category' property that is itself an array of 'category' objects. I don't think it's a lot of development overhead.

I like to have total control over my objects and their relationships so I typically avoid ORM-type frameworks. There are times ORM introduces more overhead than is necessary. If you would like to use something like ORM, head over to the wiki and have a peak at the few ORM-type libraries available.


Messages In This Thread
Newbie confusion about the database docs - by El Forum - 07-08-2008, 12:33 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 01:26 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 01:38 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 01:46 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 01:57 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 01:58 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 02:36 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 02:49 AM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 05:35 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 06:51 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 06:57 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 07:11 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 07:30 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 07:46 PM
Newbie confusion about the database docs - by El Forum - 07-08-2008, 08:10 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 05:28 AM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 06:36 AM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 08:04 AM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 08:10 AM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 12:35 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 05:11 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 06:30 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 06:47 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 08:18 PM
Newbie confusion about the database docs - by El Forum - 07-09-2008, 08:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB