You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In essence, all the metadata objects are stored inside the metadata attribute of the Organization object. This is mainly used when we are trying to model one-to-one (not the case) relationships or one-to-few (I think this is the case).
When I wrote the models, I did not include the foreign key attributes as they were inherently defined in a denormalized environment. For example, the metadata collection should have a resource_id attribute. However, should I include them just to match the HSDS schema reference and enable two-way references?
Not necessarily for all attributes. Having a denormalized data and normalized really depends on the writes/reads done to the attribute. Denormalized data works for attributes that are read often, but not changed often. It models one-to-one and one-to-few. At least for the metadata which Im assuming is not written often, it would make sense that we store it inside the organization object.
Description
There is a one-to-many relationship between
Organization
andMetadata
. We have two approaches to model this relationship.Linked (Denormalized) Data
In essence, all the metadata objects are stored inside the metadata attribute of the Organization object. This is mainly used when we are trying to model one-to-one (not the case) relationships or one-to-few (I think this is the case).
Linked (Normalized) Data
Organizations
collectionMetadata
collectionAt least for the metadata attribute I would suggest going with
Linked Denormalized
relationships.The text was updated successfully, but these errors were encountered: