No Query Language Needed: Using Python with an Ordered Key-Value Store by Stephen Pimentel.
From the post:
FoundationDB is a complex and powerful database, designed to handle sharding, replication, network hiccups, and server failures gracefully and automatically. However, when we designed our Python API, we wanted most of that complexity to be hidden from the developer. By utilizing familiar features- such as generators, itertools, and comprehensions-we tried to make FoundationDB’s API as easy to us as a Python dictionary.
In the video below, I show how FoundationDB lets you query data directly using Python language features, rather than a separate query language.
…
Most applications have back-end data stores that developers need to query. This talk presents an approach to storing and querying data that directly employs Python language features. Using the Key-Value Store, we can make our data persistent with an interface similar to a Python dictionary. Python then gives us a number of tools “out of the box” that we can use to form queries:
- generators for memory-efficient data retrieval;
- itertools to filter and group data;
- comprehensions to assemble the query results.
Taken together, these features give us a query capability using straight Python. The talk walks through a number of example queries using the Enron email dataset.
https://github.com/stephenpiment/object-store For code and the details.
More motivation to take a look at FoundationDB!
I do wonder about the “no query language needed.” Users, despite their poor results, appear to be committed to querying and query languages.
Whether it is the illusion of “empowerment” of users, the current inability to measure the cost of ineffectual searching, or acceptance of poor search results, search and search operators continue to be the preferred means of interaction. Plan accordingly.
I first saw this in a tweet by Hari Kishan.