MongoDB with Async Python Transcripts
Chapter: Modeling with Documents
Lecture: What is an Integration Database?
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Wait, what's an integration database? Good question. Databases serve different roles, especially in larger organizations.
0:11
Oftentimes, a database is a thing that just holds the data for your app. Interestingly, it's often used to handle concurrency
0:19
because of its natural acid properties that different databases have. So it serves really interesting roles for a single application.
0:30
but at large organizations, sometimes this even goes beyond serving a single application. This often is one huge relational database
0:40
that's on a really big server, you know, that is about as big as you can get it. How much RAM can you put into the computer so the whole database,
0:49
where the whole company can be in memory, that kind of stuff. So in that case, we might have multiple applications,
0:58
different apps that are handling user-facing stuff, maybe some that are doing reporting, all sorts of things, all talking to this one database.
1:08
It is the glue that holds the applications of this organization together. In this case, you probably don't even really necessarily
1:18
wanna use MongoDB or other NoSQL databases. You need something that has really, really strong
1:26
enforcement of the schema because as these apps change over time, you don't want them
1:31
to have slightly varying opinions of what a user looks like or what an appointment document looks like.
1:39
So you want something that absolutely says this is the structure of the database and
1:45
relational databases are actually really good at crashing your application when the schema doesn't match exactly what you're talking with.
1:53
More likely you have an application database, whether this is in the cloud or it's hosted on your own server in the cloud or even on-prem.
2:02
And it looks more like this. We have the same applications, but they all have their own dedicated database for the most part.
2:09
There could be some sharing, but it's not the glue that holds the company together.
2:13
And then we have them interact with each other somehow through like web services or message buses.
2:21
databases generally fit better into this kind of structure here. And when you have this kind of structure, the important thing is all those questions
2:31
we talked about before. How varied are your queries? How often do you want one bit of data when you have another piece of data, right?
2:38
If I have a package, do I want its releases? Well, when you have one application with one job talking to the database, it's usually
2:46
less varied queries, more likely you can predict when you want other data. It's a little more specialized. And so it's easier to design the documents
2:55
to fit the goals and the queries and the data modeling of that application instead of across applications like we saw in that integration database.
3:04
So if you have an application database, it's more likely that all those criteria I gave you are a good fit for your app.