Here's a first pass at the user defined field (UDF) Model architecture. There are probably a few qualities that are missing at this point, but here's the??classes required to represent the metadata:

Here, the tables and fields objects??inherit??the .NET Dictionary class (specifically Dictionary<string, IUDFTable> and??Dictionary<string, IUDFField> respectively).

There are interfaces for each, except the collections, and data access is abstracted out in the IUDF*Data interfaces. These could be implemented for each data implementation. The sample classes I created for testing the solution use PostgreSQL.

As discussed in the previous post, adding, modifying, and removing tables and fields would update the metadata (if necessary) and would modify the database structure (if necessary). For most relational databases, both of these would be necessary.

I'll continue with my implementation??as I progress in this series of posts.