Custom Metadata Types for Flexible Database Field Definitions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database systems lack the ability for users to specify custom field types defined via custom metadata types, limiting flexibility and customization options for users who need data types that behave differently from pre-existing types.
Innovation Solution
Implementing a system that allows users to create custom metadata types, specifying a name, configuration fields, and relationship fields, and then using these to define custom data types, enabling users to create fields with customized behavior and configuration information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional database systems use only pre-existing defined column types, then the system structure remains simple and stable, but users cannot specify custom field types that behave differently from standard types
Solution Approach 1:
The system segments the field type definition into two distinct components: a custom metadata type that defines the structure and behavior, and a custom datatype that references the metadata type. This segmentation allows users to create specialized field types without complicating the overall system architecture, as each component has a specific responsibility.
Solution Approach 2:
The custom metadata type acts as an intermediary between the standard database system and user-defined custom field types. It serves as a bridge that translates user customization needs into system-recognizable structures, enabling custom behavior while maintaining compatibility with the existing database framework.
2Adaptability or versatility
If users can specify custom field types with unique behavior, then flexibility and customization options increase, but the system complexity increases
Solution Approach 1:
The custom datatype mechanism provides universal functionality by allowing a single metadata type definition to be referenced by multiple fields across different objects. This multi-functionality reduces the need to redefine the same custom behavior repeatedly, simplifying field type management while maintaining high flexibility.
Solution Approach 2:
The system requires preliminary definition of custom metadata types before they can be used in custom datatypes. This preliminary action organizes the complexity upfront, creating a reusable template that simplifies subsequent field type specifications and reduces management overhead.
3Adaptability or versatility
If the system supports only pre-existing column types, then ease of operation is maintained, but users cannot achieve advanced functionalities like roll-up summaries with customized code
Solution Approach 1:
The custom datatype mechanism copies the structural pattern of standard datatypes while allowing customized behavior through metadata references. Users can declare custom field types using the same simple syntax as standard types, but with the added capability of referencing custom metadata that contains specialized behavior and configuration.
Data Source
AI summary
In accordance with disclosed embodiments, there are provided systems, methods, and apparatuses for implementing field types which are defined via custom metadata types within a computing environment. An exemplary system may include, for example: means for operating a database system within the computing architecture to store a plurality of objects; creating a custom metadata type by specifying at least (i) a name for the custom metadata type, (ii) one or more fields to contain configuration information for the custom metadata type, and (iii) at least one relationship field having fields as its domain relating the custom metadata type to a column or field of an object stored in the database system; creating a custom datatype by specifying at least (i) a name for the custom datatype, (ii) a base datatype available from the database system, and (iii) the custom metadata type; executing application code at the computing architecture, wherein the application code evaluates one or more objects referenced by the application code to identify one or more fields of the objects to identify a field of an object expressly declared as having a datatype corresponding to the custom datatype; and retrieving, via the application code, the configuration information for use by the application code. Other related embodiments are disclosed.


