Re: Newbie question about design

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 01 May 2007 13:04:25 GMT
Message-ID: <tVGZh.227$Pg4.3576_at_ursa-nb00s0.nbnet.nb.ca>


idaku2_at_gmail.com wrote:
> Hi all
>
> I don't have much experience with databases, so any help is
> appreciate. I have a class Link:
>
> class Link {
> Collection<Tag> tags;
> ...
> }
>
> so, when user creates Link, she or he can add whatever number of
> tags. In database, I would have table Link, of course, and another
> table Tag. Table Tag would have three columns: id, tag name, and the
> foreign key which is id of a link (below is URL). For example:
>
> table Tag:
> id tag link
> 1 python http://www.python.org
> 2 python http://www.google.com
>
> Is this good approach?

Whether it is a good approach will depend on your full set of requirements. For example, from the above description, I see no reason for the id column; however, I doubt the above description is complete in any case. Received on Tue May 01 2007 - 15:04:25 CEST

Original text of this message