Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding multiple topics to one row

Status
Not open for further replies.

mmasuda

Technical User
Dec 28, 2004
35
US
Hello,
I am trying to create a database which keeps track of bibliographies. Each bibliography is a table row and has one or more topics. The topics will be listed in a different table. The goal is to display the bibliographies related to a specific topic when a users clicks on the topic in a web app.
How can I add more than one topic to each row, say maybe 4, without creating a column for each?
I hope this makes sense.

thanks
 
No this doesn't make sense. I would expect that when a user clicks a TOPIC you would want to display all the BIBLIOGRAPHIES that match that TOPIC.

You said:
when a user clicks a topic.....you want to add more topics to a row.

If you meant what I thought you meant, then you are looking to concatenate several bibliographies into a single field when they match the selected topic. Is this correct?

If so, check out Thread701-1179912.



Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
thanks for the quick response.

I am not sure if I need to concatenate.

Here is a tblBib
Id name abstract topic topic topic
1 baker xxxxxx t1 t2 t3

here is tblTopic
Id topic


In order to have multiple topics, will I have to create multiple colums, or is it possible to put them into one column?

Id name abstract topic
1 baker xxxxxx t1,t2,t3

How will that affect queries I want to run on topics?


thanks
Monika
 
you need:

tblBib
ID
BibName
Abstract

tblTopic
ID
Topic

tblBibTopics
BibID
TopicID

read the article PHV indicated to see why your current design breaks the rules of database design.



Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top