benjaminbeazy Posted January 10, 2007 Share Posted January 10, 2007 hi, im trying to consolidate a table with doctor informationcurrently i have the multiple entries of the same doctor with the same "upin" idbut different rows have different addresses, specialties, and so onbasically, this is what i want to docompare these 3 fields across the separate rows with same upin: address, specialty, board_certified and if i get any differences between them to store it in a newly set up table with multiple fields for address, and specialtythis doesnt make much sense, here, example:i want to take thisUPIN Address Specialty Board Certified123 123 main cardio no123 123 main osteo yes123 678 first cardio noand turn it into this, in a new tableUPIN Address 1 Address 2 Address 3 Specialty1 Spec2 Spec3 Board Cert123 123 main 678 first cardio osteo yesi hope that is more clear... Quote Link to comment Share on other sites More sharing options...
Barand Posted January 10, 2007 Share Posted January 10, 2007 [quote]this doesnt make much sense, [/quote]I have to agree.The first thing to eliminate when designing tables is repeating data fields, so I could understand if you wanted to convert from the new format to the old but not what you are proposing. Also your proposed new table loses information - which specialiality/address does the "yes" refer to?What happens if you have someone with 4 addresses? Quote Link to comment Share on other sites More sharing options...
shazam Posted January 10, 2007 Share Posted January 10, 2007 Ben,What is your ultimate goal with the table? Is it to make querying easier for the application that uses it? Your new table doesn't seem to be scalable (like Barand says, what if a Doctor has 4 addresses).If I understand more about how your application is supposed to use this data, I may be able to provide some suggestions around design of the database.- B Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 11, 2007 Share Posted January 11, 2007 I agree, the first layout is a much more logical layout. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.