Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rudi souza
Starting Member
1 Post |
Posted - 2007-03-19 : 18:08:56
|
| HiIve recently started working with sql, and am trying to design the db to categorize a multitude of images.each image falls into their certain categories like "abstract art, surreal art, modern art, classic," and so on.The way I did it right now, without help or advice, is to create a boolean field for each category, but i have a feeling there might be a simpler and more slim solution for this.Thanks in advance |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-03-19 : 18:30:25
|
The standard way would be to have a separate category table with all your categories in it. Then link from your art table to your category table.if each piece of art can fall into more than one category (probably this is the case) you need an intermediate table in the middle, with ArtID and CategoryID. these tables are necessary whenever you have a many-many relationship.using this schema you'll have 3 tables total: Art, ArtCategory, and Category. www.elsasoft.org |
 |
|
|
|
|
|