---
title: "Compiling logic to SQL"
publication: "DB Weekly"
issue: 352
published_at: "2021-04-30"
canonical_url: "https://dbweekly.com/issues/352"
---

Plus using databases as caches, and a multi-threaded fork of Redis. |        

#​352 — April 30, 2021 

[Read on the Web](https://dbweekly.com/issues/352)   

Database Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/uwtizkop4zijjgttrdv0.jpg)](https://opensource.googleblog.com/2021/04/logica-organizing-your-data-queries.html)  

[Logica: Making Data Queries 'Universally Reusable and Fun'](https://opensource.googleblog.com/2021/04/logica-organizing-your-data-queries.html) — Google has presented _Logica_, a new (and open source) logic programming language that compiles down into SQL. The idea is to bring more formal logic based approaches to normal SQL databases. There’s [a tutorial](https://colab.research.google.com/github/EvgSkv/logica/blob/main/tutorial/Logica_tutorial.ipynb) to follow if you want to get the overall idea. 

Google   

[How Litestream Eliminated My Database Server for $0.03/month](https://mtlynch.io/litestream/) — [Litestream](https://litestream.io/) replicates data from a local (to your app) SQLite database to an S3-compatible set of SQLite snapshots. In effect, this removes the need for backups and data migrations. Oh, and it runs in its own process. 

Michael Lynch   [![\](https://copm.s3.amazonaws.com/ca96d788.png)](https://www.polyscale.io/) 

[Accelerate Database Performance Globally](https://www.polyscale.io/) — Distributed just like a CDN, PolyScale intelligently distributes and caches MySQL and PostgreSQL data to the edge. Implement in minutes without writing code or deploying servers. 

PolyScale sponsor    

[Getting Into Y Combinator with a Fork of Redis](https://console.dev/qa/keydb-john-sully/) — [KeyDB](https://keydb.dev/) is a multi-threaded high(er)-performance fork of [Redis](https://redis.io/) and in this interview, the CEO of the eventual KeyDB company explains how it all began, his work setup, and more. 

Console   

[7 Years of Open-Source Database Development: Lessons Learned](https://www.philipotoole.com/7-years-of-open-source-database-development-lessons-learned/) — The developer of [rqlite](https://github.com/rqlite/rqlite), a Go-powered, distributed SQLite-backed database system, has some high level reflections on what it’s like to work on such a project. 

Philip O'Toole   

[What is Amazon Athena? An Introduction and Walkthrough](https://www.lastweekinaws.com/blog/what-is-amazon-athena-an-introduction-and-walkthrough/) — Athena is AWS’s serverless querying service for, essentially, running SQL queries over data stored in S3. 

Alex Chan   

[Using a Disk-Based Redis Clone to Reduce an AWS S3 Bill](https://wakatime.com/blog/45-using-a-diskbased-redis-clone-to-reduce-aws-s3-bill) — They cached S3 using [SSDB](http://ssdb.io/) on their own servers. 

Alan Hamlett (WakaTime)   

[Using Amazon ElastiCache for Redis as a Near-Real-Time Feature Store](https://aws.amazon.com/blogs/database/use-amazon-elasticache-for-redis-as-a-near-real-time-feature-store/) — An overview of a setup where SageMaker results are stored in S3 with ElastiCache and Lambda functions providing a higher speed experience for end users. 

Kalhan Vundela (AWS)   

[Using `ON` versus `WHERE` to Combine and Filter Data on Joins](https://www.pluralsight.com/guides/using-on-versus-where-clauses-to-combine-and-filter-data-in-postgresql-joins) 

Jacek Trociński    

🔧 Code & Tools  

[Vitess 10: Clustering System for Horizontally Scaling MySQL](https://vitess.io/blog/2021-04-27-announcing-vitess-10/) — It’s only been 3 months since version 9 was announced, but things continue to improve for this MySQL scaling approach. v10 includes numerous performance optimizations and an experimental multi-cluster admin API and web UI. 

Vitess Team   

[nbterm: Jupyter Notebooks in the Terminal](https://blog.jupyter.org/nbterm-jupyter-notebooks-in-the-terminal-6a2b55d08b70) — Jupyter notebooks are mostly known for being presented via Web-based interfaces, but this project opens up some neat opportunities at the terminal. 

David Brochart   

[Fauna - All the Goodness of Postgres, Without Operational Bottlenecks](https://fauna.com/postgres?utm_source=DBWeekly&utm_medium=Newsletter&utm_campaign=CooperPress_Newsletters_2021) — Fauna combines the safety of Postgres with schema flexibility, modern capabilities and limitless scale. [Learn more](https://fauna.com/postgres?utm_source=DBWeekly&utm_medium=Newsletter&utm_campaign=CooperPress_Newsletters_2021)... 

Fauna sponsor   

[Datanymizer: A Database Anonymizer with Flexible Rules](https://evrone.com/datanymizer) — Written in Rust, this tool offers in-flight template-driven data anonymization for Postgres (only, for now - MySQL support is on the way). [GitHub repo](https://github.com/datanymizer/datanymizer). 

Evrone   

[tfquery: Run SQL Queries on Terraform Infrastructure](https://github.com/mazen160/tfquery) — Lets you “ask questions that are hard to answer”. 

Mazin Ahmed     

Jobs  

[DevOps Engineer at X-Team (Remote)](https://x-team.com/remote-devops-engineer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=db) — Join the most energizing community for developers and work on long-term projects for Riot Games, FOX, Sony, Coinbase, and more. 
X-Team   

[Find Data Engineering Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-dbweekly%29&utm_content=5-minutes) — Take 5 minutes to build your free profile & start getting interviews for your next job. Companies on Hired are actively hiring right now. 
Hired           

A **[Cooperpress](https://cooperpress.com/)** publication. 

[Change your email address](https://dbweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://dbweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
