The surprisingly difficult problem of user-defined order in SQL

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. mudderjs

    Lexicographically-subdivide the “space” between strings, by defining an alternate non-base-ten number system using a pre-defined dictionary of symbol↔︎number mappings. Handy for ordering NoSQL keys.

    I have solved this problem for my own purposes — no claims of grand scalability or high efficiency — by storing indices or "ranks" of items as strings (Postgres TEXT) using a library called mudderjs[0] and a thin wrapper around it[1]. Sorted lexicographically (in dictionary order) arbitrary-length strings have arbitrary precision. You can always find a string between any two strings; for instance, between "a" and "b" is "am" and between "a" and "ab" is "aam". You do have to have the entire ordered collection in scope to generate a new rank for an item, but reordering an item only requires updating one row and isn't subject to floating point precision.

    [0] https://github.com/fasiha/mudderjs

    [1] https://github.com/pubpub/pubpub/blob/master/utils/rank.ts

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. Awesome Nested Set

    An awesome replacement for acts_as_nested_set and better_nested_set.

    Ex https://github.com/collectiveidea/awesome_nested_set

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • SQL help me please with multi nested childs

    1 project | /r/rails | 1 Jun 2022
  • Active record: how to recursively load children of children of children in one query?

    2 projects | /r/rails | 1 Apr 2022
  • Hierarchical data

    1 project | /r/rubyonrails | 12 Jan 2022
  • Hierarchical Structures in PostgreSQL

    2 projects | news.ycombinator.com | 25 Jun 2021
  • How to query Ancestry fast

    1 project | dev.to | 29 Apr 2021

Did you know that Ruby is
the 12th most popular programming language
based on number of references?