I am working on an application that will be used as an extensible framework for other applications.
One of the fundamental classes is called Node, and Nodes have Content. The SQL tables look like this:
TABLE Node ( NodeId int, .... etc )
TABLE NodeContentRelationship ( NodeId int, ContentType string, ContentId int)
It will be up to the developers extending the application to create their own content types.
Clearly this is bad from a relationship-database point of view as it is not possible to add a foreign key relationship to NodeContentRelationship.ContentId, even though it is a foreign key column.
However, the solution is quite simple and powerful so I am reluctant to change it.
What do you think - am I in for a world of pain down the track?