{"repo":"LukasNiessen/relational-db-vs-document-store","free":true,"listed":false,"github":"https://github.com/LukasNiessen/relational-db-vs-document-store","clone":"git clone https://github.com/LukasNiessen/relational-db-vs-document-store.git","description":"Relational DBs vs Document-Oriented DBs for system design","language":null,"stars":21,"topics":["database","document-store","documentdb","mongodb","postgres","postgresql","relational-databases","rtdb","software-architecture","system-design"],"license":null,"category":"databases-storage","readme_excerpt":"Relational vs Document-Oriented Database for Software Architecture What I go through in here is: 1. Super quick refresher of what these two are 2. Key differences 3. Strengths and weaknesses 4. System design examples (+ Spring Java code) 5. Brief history In the examples, I choose a relational DB in the first, and a document-oriented DB in the other. The focus is on why did I make that choice. I also provide some example code for both. In the strengths and weaknesses part, I discuss both what used to be a strength/weakness and how it looks nowadays. Super short summary The two most common types of DBs are: - Relational database (RDB) : PostgreSQL, MySQL, MSSQL, Oracle DB, ... - Document-oriented database (document store): MongoDB, DynamoDB, CouchDB... RDB The key idea is: fit the data into a table . The columns are properties and the rows are the values . By doing this, we have our data in a very structured way. So we have much power for querying the data (using SQL). That is, we can do all sorts of filters, joints etc. The way we arrange the data into the table is called the database schema . Example table A database can have many tables. Document stores The key idea is: just store the data as it is . Suppose we have an object. We just convert it to a JSON and store it as it is. We call this data a document . It's not limited to JSON though, it can also be BSON (binary JSON) or XML for example. Example document Each document is saved under a unique ID. This ID can be a path, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/LukasNiessen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LukasNiessen/relational-db-vs-document-store/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}