Databases Flashcards
What 3 factors must you know about application access patterns before you design a NoSQL table.
Data Size: Knowing how much data will be stored and requested at one time will help determine the most effective way to partition the data.
Data Shape: Instead of reshaping data when a query is processed (as an RDBMS system does), a NoSQL database organizes data so that its shape in the database corresponds with what will be queried. This is a key factor in increasing speed and scalability.
Data Velocity: DynamoDB scales by increasing the number of physical partitions that are available to process queries, and by efficiently distributing data across those partitions. Knowing in advance what the peak query loads might help determine how to partition data to best use I/O capacity.
How is NoSQL design different from RDMS design?
- You shouldn’t start designing your schema for DynamoDB until you know the questions it will need to answer. Understanding the business problems and the application use cases up front is essential.
- You should maintain as few tables as possible in a DynamoDB application.
Planning for a NoSQL solution can be broken up into 2 phases. What are they and what happens in each phase?
- Requirements gathering: Understanding the data’s size, shape, and velocity as well as the required access patterns.
- Plan data organization: somewhat dependent on the technology, but general principles apply: as few tables as possible, keeps related data together, use sort order, distribute queries, use global/primary key indexes.
What factors must be considered when selecting a NoSQL solution vs a RDMS solution?
The weight of the attribute will determine the solution.
RDMS NoSQL
Significant query flexibility Consistent, structured access
Small data, slow to scale massive, distributed data