Skip to content

Database Schema Example

Ryan Govostes edited this page May 13, 2021 · 2 revisions
> db.cruises.findOne()
{
	"_id" : ObjectId("deadbeef..."),
	"cruise_id" : "lorem-ipsum",
	"start_ts" : ISODate("2019-10-29T00:00:00Z"),
	"stop_ts" : ISODate("2019-11-12T00:00:00Z"),
	"cruise_location" : "lorem-ipsum",
	"cruise_tags" : [ ],
	"cruise_hidden" : false,
	"cruise_access_list" : [ ],
	"cruise_additional_meta" : {
		"cruise_name" : "lorem-ipsum",
		"cruise_vessel" : "lorem-ipsum",
		"cruise_description" : "lorem-ipsum",
		"cruise_files" : [ ],
		"cruise_pi" : "lorem-ipsum",
		"cruise_participants" : [ ],
		"cruise_linkToR2R" : ""
	}
}

> db.custom_vars.findOne()
{
	"_id" : ObjectId("deadbeef..."),
	"custom_var_name" : "asnapStatus",
	"custom_var_value" : "Off"
}

> db.event_aux_data.findOne()
{
	"_id" : ObjectId("deadbeef..."),
	"event_id" : ObjectId("deadbeef..."),
	"data_source" : "vehicleRealtimeCTDData",
	"data_array" : [
		{
			"data_name" : "sensor",
			"data_value" : "SBE",
			"data_uom" : "string"
		},
		{
			"data_name" : "temperature",
			"data_value" : "12.7344",
			"data_uom" : "C"
		},
		{
			"data_name" : "conductivity",
			"data_value" : "0.00001",
			"data_uom" : "S/m"
		},
		{
			"data_name" : "salinity",
			"data_value" : "-0.144",
			"data_uom" : "PSU"
		}
	]
}

> db.event_templates.findOne()
null

{
	"_id" : ObjectId("deadbeef..."),
	"event_options" : [ ],
	"ts" : ISODate("2001-06-21T01:53:39Z"),
	"event_author" : "lorem-ipsum",
	"event_value" : "lorem-ipsum",
	"event_free_text" : "lorem-ipsum"
}


{
	"_id" : ObjectId("deadbeef..."),
	"lowering_id" : "lorem-ipsum",
	"start_ts" : ISODate("2018-09-21T22:09:27Z"),
	"stop_ts" : ISODate("2018-09-24T21:18:47Z"),
	"lowering_location" : "",
	"lowering_tags" : [ ],
	"lowering_hidden" : true,
	"lowering_access_list" : [
		"5981f167212b348aed7fb9f5"
	],
	"lowering_additional_meta" : {
		"lowering_description" : "",
		"lowering_files" : [ ]
	}
}

> db.users.findOne()
{
	"_id" : ObjectId("deadbeef..."),
	"username" : "lorem-ipsum",
	"fullname" : "lorem-ipsum",
	"email" : "lorem-ipsum",
	"password" : "lorem-ipsum",
	"last_login" : ISODate("2021-04-29T17:23:29.259Z"),
	"roles" : [
		"event_watcher"
	],
	"system_user" : true,
	"disabled" : false
}
Clone this wiki locally