This lesson discusses the trade-offs between traditional databases and NoSQL and describes the resulting developer-facing features in Megastore’s development.

API design

In traditional databases, to facilitate user operations, normalized relational schemas depend on joins at query time. This is not the proper approach for Megastore applications because of the following reasons:

  • Relatively stable performance benefits high-volume interactive workloads much more than an expressive query language, for example, SQL provides many types of joins.
  • It is beneficial to shift work from read time to write time since there are more reads than writes in the applications where Megastore is to be used. Traditional database queries are translated into an execution plan, and then this plan is optimized when a query is submitted.
  • In key-value systems like Bigtable, storing and accessing hierarchical data is simple. Therefore, we might not need extensive query optimization.

Considering these factors, we have created a data model and schema language that gives users granular control over where their data is stored.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.