So I've decided to write some code as part of designing the user defined field architecture. I've started??with some C# and PostgreSQL.??It's been interesting getting back into C# after looking at Java for quite some time.

This is slowing down my blogging about the architecture of user defined fields. On top of that, this is currently a side project, but based on a large amount of work I've done in the past. There are a few quality attributes to consider in the architecture:

  • Database Integrity and Data Integrity
  • Protection from??Loss of Data
  • Security (Authentication and Authorization)
  • Robustness and Error Handling
  • Design Patterns (Factory and Singleton)
  • Abstraction of Database from Object Oriented Structures
  • Forgiveness

From a database integrity point of view, if a table is stored in the metadata, it needs to also exist in the schema. Also, there needs to be data integrity around foreign keys and parent/child tables. If implemented properly, this will prevent loss of data.

Additionally, if the user deletes user defined fields and/or user defined tables, what do you do with the underlying data? Do you remove it or do you store it in an archive? Do you build in forgiveness and let the user undo the action?

For security, is there table, field, or row level security? What security mechanisms should be in place for this security? I would promote user defined, metadata based security based on data groupings and roles.

If the list of tables is a singleton, does this preclude managing user defined tables in multiple databases and/or schema? I'm going with a singleton, but this could be changed later.

How do we handle scalability and performance? For a relational database we add primary keys and indexes dynamically.

I'll need to move forward and document the architecture further and work through the code. All of this is for tables and some of this needs to be applied to the individual fields. This will be covered later.

Also, it would make sense if the tables and look-ups were in the same user-defined table metadata list.

I need to be careful not to fall into Brooks' second system effect.