title: db design critic /suggestions
body: <p>I am redesigning a pharmacy db system and need inputs to see if the new design is optimal or requires tweaking. </p>
  
  <p>Here's a snapshot of the old system..</p>
  
  <p><img src="https://i.stack.imgur.com/eb24R.png" alt="Pharmacy Db Old"></p>
  
  <p>As can be seen, the pharmacies table stores pharmacy information, along with its address and contact information. Pharmacies are grouped together for invoicing purposes(pharmacygroup) or for sales, advertsing other purposes (banner group). The invoice group may have a different physical address, different contact information. </p>
  
  <p>Here's my new design. I have split the address from both the pharmacy and pharmacygroup table into a table of its own and made a new table for contacts. Their could be technical contacts, account contacts, owner contacts etc, hence the contacttypes table. The pharmacy and the pharmacygroup can have separate  contact info, I thought of making a single contact table and have a 'linktype' and 'linkid' column to indicate if its a pharmacy contact or pharmacy group contact, but I am not sure if this is a right approach. Is this a good design or will it be costly in terms of data retrieval because of the number of joins?? Another thing I noted that , is in the old design , they didn't create any foreign key constraints, although the pharmacy table had groupid and bannergroupid references for pharmacygroup and bannergroup, possibly to save time for data retrieval. Is this a good approach?</p>
  
  <p><img src="https://i.stack.imgur.com/MssLe.png" alt="Pharmacy Db Design New"></p>