Working on a project where I want to have a single collection for all my documents. I have 4 different document types but I don’t know how to properly define them in a single schema.
I created a cluster already. I pulled the project files from realm into my project folder using realm-cli. In …/data_sources/mongodb-atlas/schemas/ I have relationships.json, rules.json, schema.json. As described above I want to define multiple document types in the schema.json folder. For example, I have:
{
"title": "documentA",
"bsonType": "object",
"required": [
"_id",
],
"properties": {
"_id": {"bsonType": "objectId"},
"name": {"bsonType": "string"}
}
}
How can I add another another document type to this file (i.e. “title”: “documentB”)?
Additionally, for AWS Dynaomdb single table design is sort of the standard. Is that the same case here or is there performance pros/cons to be aware of here?