Performance often comes at the sake of good design. Good design should always come first though. :)
Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 > -----Original Message----- > From: Micha Schopman [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 23, 2004 8:19 AM > To: CF-Talk > Subject: RE: In One? > > I thought you were making a joke.. :) One of the principles of a good > database design is not to use lists of id's. You could better if you > really want to do such thing, create a seperate table to store the path. > The disadvantage of using lists is, you cannot use constraints to force > existing relationships and you cannot index the data in a optimal form. > > You'd be better off with two tables like: > > Table 1: Path > ID = Identity > ObjectID = Int (object for which the path is stored, so this could also > be ArticleID for example) > > Table 2: PathData > ID = Identity > PathID = Int (Contains ID from the Path table) > Priority = TinyInt (Contains an order) > Target = Int (contains the result of a path, can be ID, anything you > want to) > > So with this data > > Path table: > ID = 1 > ObjectID = 138475384047 > > PathData > ID = 1 > PathID = 1 > Priority = 1 > Target = 3567242 > > ID = 1 > PathID = 1 > Priority = 2 > Target = 3453456 > > ID = 1 > PathID = 1 > Priority = 3 > Target = 75637 > > > So you'll get the path for ObjectID = 138475384047 > Path = 3567242,3453456,75637 > > And this data can easily be extended with constraints, indexes etc. > > > Micha Schopman > Software Engineer > > Modern Media, Databankweg 12 M, 3821 AL Amersfoort > Tel 033-4535377, Fax 033-4535388 > KvK Amersfoort 39081679, Rabo 39.48.05.380 > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188634 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54