A data storage model describes how persistent data is organized, including records, attributes, and relationships. The choice shapes how applications retrieve data, scale, and support particular usage scenarios. section 4.1.1
Two common approaches organize data differently:
- SQL databases use tables with fixed rows and columns. Each table represents one record type, such as Users, Roles, BoardGames, or Comments. section 4.1.1
- NoSQL databases use collections of documents with flexible key/value schemas. A document commonly stores a record together with related information, such as a board game and its comments. section 4.1.1
- SQL relationships typically use primary keys and references. For example, a Comments table can contain BoardGameID to associate each comment with one board game. section 4.1.1
Compare a table-oriented schema with the corresponding document-oriented design when choosing how a board-game API should persist related data. section 4.1.1
