Document Databases
Document databases have become very popular alternatives to relational databases.
One of the reasons is that they are a little more flexible in how they store data.
Rather than tables with rows and columns, they store collections of “documents”.
You can think of a document like a paper form. The form might have a structure but it can vary on how much information is filled in. Regardless of how complete it is, each instance of that form is a snapshot. You can stack those forms into a collection of forms.
Using the Pet & Owners example, a document database often flattens the data into a snapshot.
That might work like so: Owners Bob Pets Spike Vector
Now, Bob and all his pets can be found in one place.
This is beneficial for times when your data needs flexibility. You may know that you want to store pet owners - you may not know exactly what info you’ll get about them.
You don’t have to know exactly what the structure will be ahead of time.
That makes them great for storing real-world data.
Both of these databases are great for their strengths. Another has popped up to handle relationships a little differently.