Last active
May 28, 2023 07:29
-
-
Save crearo/7be60628dcea932899f3738e09bb6387 to your computer and use it in GitHub Desktop.
Big no to NoSQL: This showcases how it optimizes either reads or writes. You can't do both.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"users": [ | |
{ | |
"_id": "user1", | |
"email": "user1@example.com", | |
"name": "User One", | |
"gender": "male", | |
"friends": [ | |
{ | |
"_id": "user2", | |
"status": "accepted", | |
"details": { | |
"email": "user2@example.com", | |
"name": "User Two", | |
"gender": "female" | |
} | |
}, | |
{ | |
"_id": "user3", | |
"status": "pending", | |
"details": { | |
"email": "user3@example.com", | |
"name": "User Three", | |
"gender": "non-binary" | |
} | |
} | |
] | |
}, | |
{ | |
"_id": "user2", | |
"email": "user2@example.com", | |
"name": "User Two", | |
"gender": "female", | |
"friends": [ | |
{ | |
"_id": "user1", | |
"status": "accepted", | |
"details": { | |
"email": "user1@example.com", | |
"name": "User One", | |
"gender": "male" | |
} | |
} | |
] | |
}, | |
{ | |
"_id": "user3", | |
"email": "user3@example.com", | |
"name": "User Three", | |
"gender": "non-binary", | |
"friends": [ | |
{ | |
"_id": "user1", | |
"status": "sent", | |
"details": { | |
"email": "user1@example.com", | |
"name": "User One", | |
"gender": "male" | |
} | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"users": [ | |
{ | |
"_id": "user1", | |
"email": "user1@example.com", | |
"name": "User One", | |
"gender": "male" | |
}, | |
{ | |
"_id": "user2", | |
"email": "user2@example.com", | |
"name": "User Two", | |
"gender": "female" | |
}, | |
{ | |
"_id": "user3", | |
"email": "user3@example.com", | |
"name": "User Three", | |
"gender": "non-binary" | |
} | |
], | |
"friendships": [ | |
{ | |
"_id": "friendship1", | |
"user1_id": "user1", | |
"user2_id": "user2", | |
"status": "accepted" | |
}, | |
{ | |
"_id": "friendship2", | |
"user1_id": "user1", | |
"user2_id": "user3", | |
"status": "pending" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment