I have a few related tables that collects information about a given publication. The information collected varies based on the type of collection and is stored in a few different tables. The latest requirement the customer wants is to alert the faculty when a publication is added that is 90% similar to another publication. To facilitate this I want to create a flat lookup table that I can easily query and manipulate.
The Database
Expand|Select|Wrap|Line Numbers
- ---------------
- PUBLICATIONS
- ---------------
- PublicationID (int)
- PublicationTypeID (int)
- AuthorList (varchar)
- Synopsis (varchar)
- ------------------
- PUBLICATION_TYPE
- ------------------
- PublicationTypeID (int)
- PublicationTypeName (varchar)
- ----------------------
- PUBLICATION_TYPE_FIELD
- ----------------------
- FieldID (int)
- PublicationTypeID (int)
- FieldType (varchar)
- FieldName (varchar)
- Required (bit)
- ------------------------
- PUBLICATION_INFORMATION
- ------------------------
- PublicationID (int)
- FieldID (int)
- FieldValue (varchar)
Is it plausible or even reasonable to create a flat table view that would allow all the information be available in a single table?
IE:
==================================================
PublicationID | PublicationType | Field Name | Field Name | Field Name |
---------------------------------------------------------
1 | Book | Value | Value | Value |
Where the additional columns in the table are dynamically created by the available field type possibilities in another table?
Or have I lost my marbles and need to try a different approach?