Object Properties

{  }

Object Properties are the unique fields that make up an Object. Each property is associated with a value that defines the property for the object. The Chakra7 Object Types define the core properties of each type of object but additional information can be included as well.

For example, we may have a system with Artist objects. Our Artist objects may have the core properties: fName, lName, age:

Robert Plant (Person Object)
Property Name Value
fName Robert
lName Plant
Age 24

Values can take a variety of types:
  • Booleans: The simplest type in computing: either true or false
  • Integers: A whole number Ex: -1, 0, 1, 2 …
  • Floats (Decimals): A number with optional decimal component Ex: 12.145, 7.2, 5
  • Strings: Character sequences usually depicted in double quotes: Ex: “Hello World”
  • Object References: A reference to another object in the database
  • Inline Objects: Freeform objects can be embedded into other documents rather that storing separately and referencing. Allows for greater flexibility
  • Arrays: Powerful value type that is an ordered list of other values and is represented by a comma separated list within square brackets Ex: [1, “Tom”, 22]. Arrays can be more complicated, for example:
  • Array of Inline Objects
  • Array of Object References

Global Values

In addition to the above types, Chakra7 also offers an additional type called global values. These are system wide categorizations that can be used in various object definitions.

In many systems, data needs to be categorized into one (or more) of several distinct categories. For example, a Book object may have a Genre property which can be any value from the list of available Genres. Further, perhaps within the same system an Author object can have a Genres parameter with multiple Genre values.

For this special case where you have a fully exhausted enumeration of the various options, a new Global Value can be created and used in various ways by different aspects of the system.

Object References

Synonyms: Foreign Objects, Referenced Objects, Reference by ID, External Objects, Object Pointers

Often times, object properties reference other objects by id. A library client’s system would likely have Author and Book objects and for the Book’s Author property, we would want to reference the Author object by id.

The benefits to this occur when information is added or changed to the Author object, all of the Book objects are still in perfect sync. This approach is also beneficial because we start to assemble great building blocks that can be used all throughout the system. We can easily add Favorite Book and Favorite Author lists for our users

Embedded Objects

Synonyms: Internal Objects, Sub-Objects

Sometimes we may want to store a free-form sub-object or an array of free-form sub-objects within the parent object to minimize database queries involved with looking up each foreign referenced object.

This is well suited for cases when the embedded information is not likely to be referenced by other objects in the system. For example, perhaps a real estate system would rather store recent Tax Appraisal sub-objects within the Estate Listing object than maintaining separate Tax Appraisal objects.