Complicated related table problem

G

Guest

I have a topic table that contains many columns. Among them are the ID key
column and the topictext column. The later may be a news itm, a magazine or
newspaper article, a Palestinian or Israeli government, ministrial or
committee document, among other things.

A 'concept' is one way I classify a topictext. A concept refers to a portion
of the text. The concept table includes an ID key, concept(string),
Active(Boolean), and ParentID.

Kevin Yu was helpful in putting concepts into listboxes according to the
relation between the selected value and the relationship between the ID of
one level and the ParentID of its children.

An example might be: Palestinian intercine conflict while its children
include militant groups against Palestinian forces, Palestinian forces
against one another, kidnapping of PA officials and so on. These too have
children.

When I save a concept I'm actually inserting a row into the
ConceptAssignmentInstances table. Key columns are TopicID, ConceptID and
BeginText. BeginText because, say within the topictext, we click IDF Actions
against Palestinian Militants. This may include

1) Arrest 3 fugitives
2)Shoot two militants on the way to a homicide bombing.
and so on.

Two more columns, ReportType(opinion, report, statement, document, quote,
etc.), and PointOfView.

The complication comes with quotes. My database includes a table called
KeywordSets, and another called KeywordSetGroups. Each KeywordSet can be
assigned to any number of groups, including persons.

If the ReportType is a quote I fill two listboxes with the rows of
KeywordSetGroups Persons Group. One reflects the speaker, the person who
makes the quote, while the second are the one or more targets of the quote.
Say, Palestinian Prime Minister Qurei is the speaker and both PM Ariel Sharon
and Finance Minister Bibi Netanyahu and the targets.

The table is called QuoteAsssignments and I'm unsure of what columns it must
have to connect it to the ConceptAssignmentInstances when its report type is
Quote. Do I really have to use all three keyfields (topicID, ConceptID and
BeginText)?

Or is it more efficient to add an ID field to ConceptAssignmentInstances and
use that as the foreign key is QuoteAssignments, say CAI_ID?

Dennis
 
K

Kevin Yu [MSFT]

Hi Dennis,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know whether it would be
better to use three columns as primary key or add a single ID column as
key. If there is any misunderstanding, please feel free to let me know.

Based on my experience, both will be fine. If you use three columns as
primary key, it will be more intuitionistic for us to find through the
Topic and Concept. If you use another new ID column as key, it will be
easier for you to manage the table.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top