Question 31
MediumWhat is sharding?
- A.
Splitting data across several servers by a key
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
What is sharding?
Splitting data across several servers by a key
Copying all data to every server
Compressing a database
Encrypting data
Sign up free to see the answer and a step-by-step explanation.
How is horizontal scaling different from vertical scaling?
Vertical scaling adds more servers
Horizontal adds more machines; vertical makes one machine more powerful
Horizontal adds more RAM to one server
They are the same
Sign up free to see the answer and a step-by-step explanation.
When might a relational database be a better choice than a NoSQL database?
When storing simple cached values
When data is a graph of connections
When the schema changes every day
When the data is highly structured and needs complex joins and strong transactions, as in banking
Sign up free to see the answer and a step-by-step explanation.
What is replication in a distributed database?
Indexing every column
Splitting data across servers
Keeping copies of the same data on several servers
Deleting old data
Sign up free to see the answer and a step-by-step explanation.
A shopping cart service must accept 'add to cart' even when part of the network is down, and can tolerate briefly stale carts. Which CAP choice fits?
Consistency and availability without partition tolerance
Availability and partition tolerance (AP)
None of these
Consistency and partition tolerance (CP)
Sign up free to see the answer and a step-by-step explanation.
A bank ledger must never show two different balances, even during a network split. Which CAP choice fits?
AP
CP: refuse some requests rather than give inconsistent answers
Neither C nor P
Only availability matters
Sign up free to see the answer and a step-by-step explanation.
A system has 5 replicas. Writes wait for 3 acknowledgements. How many replicas must a read contact to always see the latest write?
5
1
2
3
Sign up free to see the answer and a step-by-step explanation.
Which NoSQL type is the best fit for storing user sessions keyed by session ID?
Column-family store for analytics
Graph database
Relational data warehouse
Key-value store
Sign up free to see the answer and a step-by-step explanation.
Which NoSQL type suits product catalogues where each product has different attributes?
Document store
Key-value store with no structure
Graph database
Time-series database
Sign up free to see the answer and a step-by-step explanation.
Which NoSQL type suits huge write-heavy data such as sensor readings queried by device and time?
Graph database
In-memory key-value cache
Document store with many joins
Wide-column store such as Cassandra
Sign up free to see the answer and a step-by-step explanation.