Skip to content

2DB or not 2DB?

March 23, 2017

When I originally designed the Mongo schema for my Cosmopolitos simulations, I wanted to keep redundant data to a minimum. To that end, I designed a simulation to be made up of a World entry and Snapshot entry for every day of simulation time. The information that would not change over time, such as the tilt and size of the planet, exists in the World entry while things in flux exist in the Snapshot entries. Snapshots were either going to be nested into World entries or maintain the id of their mother World.

This kind of system amounted in great deal of infrastructure to move between World and Snapshot entries and while easy to conceptualize amounted in lack of extendibility when I wanted to add information to both.

For that reason I decided to merge the two schemas so that each simulation entry could stand up on its own and ostensibly be passed to a different program and so that querying data was simpler.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: