Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Question regarding Database Design

Posted on 2011-05-05
5
Medium Priority
?
241 Views
Last Modified: 2012-05-11
I have two tables a UserInfo table that stores user specific information and a TransactionResponse table that holds the transaction response information. Both these tables have a requestID that is common to both tables. What would be the most optimum way to design the said database.

Thanks,
Aditya
0
Comment
Question by:pmac38CDS
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35700522
Is the requestID the primary unique value for either table?
Is the requestID the primary unique value for any other table in the database?
0
 
LVL 1

Author Comment

by:pmac38CDS
ID: 35700621
No it is not a primary key for any of the tables.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35700641
Are you likely to be querying the database tables using the RequestId in the where clause?
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 2000 total points
ID: 35700704
I would have 3 tables

UserInfo Table
UserInfoId PK
...

TransactionResponse Table
TransactionResponseId PK
---

Request Table
RequestId PK
UserInfoId FK
TransactionResponseId FK

This will fulfill the requirements of normalisation by removing duplicate data from tables.
0
 
LVL 1

Author Closing Comment

by:pmac38CDS
ID: 35704834
That is exactly what I was thinking. Having a mapping table that would link the two tables. Thanks for your help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question