Forums for the Business Analyst

 
  Modern Analyst Forums  Business and Sy...  Data Analysis f...  which apprach is better to to introduce an ID field or combine other fields
Previous Previous
 
Next Next
New Post 7/10/2011 4:00 PM
User is offline John_DB
1 posts
No Ranking


which apprach is better to to introduce an ID field or combine other fields  

I have the following problems when i am designing my database for an online exam system:-
1. I have a question table and answer table; where each question contains many answers and each answer have one question.
Now i have two approaches for designing the answer table, either by having:-

Answer_Id (PK),
Answer_Description,
Is_right.
Question_ID (FK)

Or

Answer_description
Is_right.
Question_ID (FK)
Having PK (Question_ID & Answer_description).

2. Same issue applies for this scenario; I have an article table and a comment table, where each article can have many comments and each comment can belong to an article.

Now i have two approaches for designing comment table, either by having:-
Comment_ID (PK)
article_ID (FK)
Comment_Desc
Created_BY
Created_time

Or

article_ID (FK)
Comment_Desc
Created_BY
Created_time

Having PK(Created_BY & Created_Date), since it s not possible to be able provide two comment at the same time!by the same user!!

So is it better to introduce the ID field for both (comment & answers) tables or having my PK by combining the available columns
Thanks in advance for any help.

 
Previous Previous
 
Next Next
  Modern Analyst Forums  Business and Sy...  Data Analysis f...  which apprach is better to to introduce an ID field or combine other fields

Community Blog - Latest Posts

Fabricio Laguna talks Business Analysis and AI
I recently connected with Fabricio Laguna, aka The Brazilian BA. Fabricio is a passionate and pioneering business analyst from Brazil. During our conversation, we had a thought-provoking discussion on how artificial intelligence stands to shape the field of business analysis in the years ahead. While AI promises to transform many aspects of busines...
Business Architecture, Ontology and More with Terry Roach
It's been a privilege meeting Terry Roach, a visionary in the field of enterprise architecture and business architecture. Terry's insights into the evolution of business models, the importance of ontology in architecture, and the potential of AI to shape our future were not only thought-provoking but also a reflection of his extensive exper...
Today I had the pleasure of chatting to Jignesh Jamnadas, Chief Operations Officer at Mosaic, about his Blueprints for Success. As a Senior Finance and Operations Executive, Jigs (as he is known to many) has a holistic understanding of all facets of business and a flair for managing both people and processes. Having worked with Jigs, I was struc...

 



Upcoming Live Webinars




 

Copyright 2006-2024 by Modern Analyst Media LLC