title: Junction Table & Normalization Question
body: <p>I am having a hard time trying to figure out if the following design pattern is acceptable. I have the following requirements (and some other more) for a relational model:</p>
  
  <p>1) It must be able to represent applications (such as <code>AppA</code>, <code>AppB</code>, <code>AppC</code>), each one with it's own set of attributes.</p>
  
  <p>2) Every applications can communicate through different channels like <code>Internet</code> (E-Mail, Twitter, Facebook), <code>Phone</code> (SMS, MMS, etc.) so that there's a many-to-many relationship between programs and channels.</p>
  
  <p>3) There is a set of pre-defined identifiers (addresses, phone-numbers, login accounts) which can be shared by many programs, so that, again, there's a many-to-many relationship between programs and identifiers.</p>
  
  <p>4) The same identifier can send several types of messages, and so can the programs (again, many-to-many), but I need to be able to restrict usage of identifiers for communications type on a per-application basis.</p>
  
  <p>Basically, what I did was to create four tables, <code>Program</code>, <code>Channel</code>, <code>Ident</code> and <code>CommunicationType</code> to store information about each of these and, instead of creating junction tables for <code>(Program, Channel)</code>, <code>(Program, Identifier)</code>, and so on which would just complicate the design, I created a single table consisting of the primary keys of these four tables with a unique constraint on <code>(Program, Channel, Ident, CommunicationType)</code>. Now, each record of this table is linked to a given communication.</p>
  
  <p>Of course, this solves my problem in a pretty easy way, but now I am questioning myself whether this is acceptable at all of if it defeats the principles of normalization. Can anyone please give me an opinion?</p>