mstr_entities


Description

Master list of legal entities with whom the business interacts.

All legal entities are represented by this table, including the business using this application itself.

General Usage

The information stored in this record represents general information about the entity that is broadly applicable in all contexts which might use the entity.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 uuid_generate_v7()
mstr_contacts.owning_entity_id mstr_contacts_owning_entity_fk C
mstr_entities.owning_entity_id mstr_entities_entities_fk R
mstr_entity_bank_entities.entity_id mstr_entity_bank_entities_entity_fk C
mstr_entity_bank_entities.owning_entity_id mstr_entity_bank_entities_owning_entity_fk C
mstr_entity_facility_places.owning_entity_id mstr_entity_facility_places_owning_entity_fk C
mstr_entity_inventory_places.owning_entity_id mstr_entity_inventory_places_owning_entity_fk C
mstr_entity_person_roles.entity_id mstr_entity_person_roles_entity_fk C
mstr_entity_purchasing_entities.entity_id mstr_entity_purchasing_entities_entity_fk C
mstr_entity_purchasing_entities.owning_entity_id mstr_entity_purchasing_entities_owning_entity_fk C
mstr_entity_selling_entities.entity_id mstr_entity_selling_entities_entity_fk C
mstr_entity_selling_entities.owning_entity_id mstr_entity_selling_entities_owning_entity_fk C
mstr_entity_staff_entities.entity_id mstr_entity_staff_entities_entity_fk C
mstr_entity_staff_entities.owning_entity_id mstr_entity_staff_entities_owning_entity_fk C
mstr_persons.owning_entity_id mstr_persons_entities_fk R
mstr_places.owning_entity_id mstr_places_entities_fk R

The record’s primary key. The definitive identifier of the record in the system.

General Usage

This column is system maintained and should be considered read only in normal operations.

owning_entity_id uuid 2147483647 null
mstr_entities.id mstr_entities_entities_fk R

Indicates which managing entity is the owning entity for purposes of default visibility and usage limitations.

General Usage

The limited cases are primarily evident in searches and lists.

Explicit assignment of rights to entities, persons, facilities, etc. that are not the owning entity is still possible and those rights will prevail over the default access rules for non-owning entities.

There is a special case of owning entity where an entity is self owning. There may only be a single entity that is self owning and that, by definition, establishes that entity as the ‘global entity’. The global entity has global administrative rights as well as allows access to those persons, facilities, and entities that it owns effectively making them global to all other managed entities. The global entity may be an actual business entity which essentially owns the MSBMS Instance or it may a purely administrative construct for managing the system.

internal_name text 2147483647 null

A candidate key useful for programmatic references to individual records.

General Usage

This column is system maintained and should be considered read only in normal operations.

display_name text 2147483647 null

A friendly name and candidate key for the record, suitable for use in user interactions

General Usage

This column is system maintained and should be considered read only in normal operations.

external_name text 2147483647 null

A non-unique/non-key value used to display to users and external parties where uniqueness is less of a concern than specific end user presentation.

entity_type_id uuid 2147483647 null
syst_enum_items.id mstr_entities_entity_types_fk R

Defines the kind of entity that is being represented by the record and by extension the kinds of uses in which the entity may be used.

General Usage

Application functionality is determined in part by the configuration of the selected type.

entity_state_id uuid 2147483647 null
syst_enum_items.id mstr_entities_entity_states_fk R

Establishes current state of the entity in the established lifecycle of entity records.

General Usage

Certain application features and behaviors will depend on the configuration of the state value selected for a entity record.

diag_timestamp_created timestamptz 35,6 now()

The database server date/time when the transaction which created the record started.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_role_created text 2147483647 null

The database role which created the record.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_timestamp_modified timestamptz 35,6 now()

The database server date/time when the transaction which modified the record started. This field will be the same as diag_timestamp_created for inserted records.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_wallclock_modified timestamptz 35,6 clock_timestamp()

The database server date/time at the moment the record was actually modified. For long running transactions this time may be significantly later than the value of diag_timestamp_modified.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_role_modified text 2147483647 null

The database role which modified the record.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_row_version int8 19 1

The current version of the row. The value here indicates how many actual data changes have been made to the row. If an update of the row leaves all data fields the same, disregarding the updates to the diag_* columns, the row version is not updated, nor are any updates made to the other diag_* columns other than diag_update_count.

General Usage

This column is system maintained and should be considered read only in normal operations.

Direct Usage

This column is frequently used by by application logic to resolve the “dirty write” issues which can arise from concurrent data changes. As such any administrative override of automatic system maintenance of this value should consider the ramifications on application function.

diag_update_count int8 19 0

Records the number of times the record has been updated regardless as to if the update actually changed any data. In this way needless or redundant record updates can be found. This row starts at 0 and therefore may be the same as the diag_row_version - 1.

General Usage

This column is system maintained and should be considered read only in normal operations.

Indexes

Constraint Name Type Sort Column(s)
mstr_entities_pk Primary key Asc id
mstr_entities_display_name_udx Must be unique Asc display_name
mstr_entities_internal_name_udx Must be unique Asc internal_name

Relationships