# [[Database]] ![[Database.svg]] A database is a collection of information that is stored in an organised, structured way for ease of retrieval. The difficult task of databases is really the latter part of that sentence: optimizing the information so that it's easily retrieved using a number of methods. ## Database concepts - [[Database index|Index]] - [[Primary key]] - [[Foreign key]] - [[Cardinality]] - [[Replication Factor]] - [[Write Ahead Log]] ## Types ### By data stored - [[Time-series database]] - [[Graph Database]] - [[Neo4j]] - [[Vector Database]] ### By storage - [[Column-oriented database]] - [[Row-oriented database]] ## [[Database Architecture]] ## Tradeoffs in databases - [[Data analysis comes at the expense of data processing]] and vice versa, so a choice must be made whether to prioritize the analysis of data (like [[Aggregating monitoring data|Aggregation]]) or processing and retrieving it - [[Making the read path faster means making the write path slower and vice versa]], so databases with fast read times usually have slow [[Ingest]] times. ## Databases - [[Prometheus]] - [[Grafana Mimir|Mimir]] - [[Grafana Loki|Loki]] - [[Postgres]] - [[Grafana Pyroscope|Pyroscope]] - [[MariaDB]] - [[MySQL]] %% # Excalidraw drawing ## Text Elements ## Drawing ```json { "type": "excalidraw", "version": 2, "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.4", "elements": [ { "id": "4y8R7iOA", "type": "text", "x": 118.49495565891266, "y": -333.44393157958984, "width": 3.8599853515625, "height": 24, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "transparent", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, "groupIds": [], "frameId": null, "roundness": null, "seed": 967149026, "version": 2, "versionNonce": 939059582, "isDeleted": true, "boundElements": null, "updated": 1713723615080, "link": null, "locked": false, "text": "", "rawText": "", "fontSize": 20, "fontFamily": 4, "textAlign": "left", "verticalAlign": "top", "containerId": null, "originalText": "", "lineHeight": 1.2 } ], "appState": { "theme": "dark", "viewBackgroundColor": "#ffffff", "currentItemStrokeColor": "#1e1e1e", "currentItemBackgroundColor": "transparent", "currentItemFillStyle": "solid", "currentItemStrokeWidth": 2, "currentItemStrokeStyle": "solid", "currentItemRoughness": 1, "currentItemOpacity": 100, "currentItemFontFamily": 4, "currentItemFontSize": 20, "currentItemTextAlign": "left", "currentItemStartArrowhead": null, "currentItemEndArrowhead": "arrow", "scrollX": 583.2388916015625, "scrollY": 573.6323852539062, "zoom": { "value": 1 }, "currentItemRoundness": "round", "gridSize": null, "gridColor": { "Bold": "#C9C9C9FF", "Regular": "#EDEDEDFF" }, "currentStrokeOptions": null, "previousGridSize": null, "frameRendering": { "enabled": true, "clip": true, "name": true, "outline": true } }, "files": {} } ``` %%