I have recently been studying up on microservices, and an associated idea that I've seen is that of polyglot persistence and microservices working with their own databases, or whatever storage they may be using. My question is how does this model handle relational data that may span more than one service?For example, say you have a microservice for dealing with Customer information, and one dealing with Orders. I would assume an Order would need a way to reference a given Customer in its storage model, which I believe a relational database handles well, but if these microservices truly have independent databases, how is this handled?As a side note, I've worked with one large relational database in my organization for the last three years, so I could understand if my thinking has been clouded by repetition, but I am very eager to understand this concept. Thanks!
How does Polyglot Persistence handle relational data?
relational database;architectural patterns;microservices;polyglot
Polyglot persistence is just a fancy name for heterogenous data stores (which I suppose is also a fancy name).  You can solve the problem in a number of ways:Have One Table to Rule Them All: a specific Primary Key in a specific database is the master identifier for a particular entity,Have mapping tables that map the keys of one data store to the keys of another,Use keys that are globally-unique, like GUIDs.