Ra is a new programming language designed from the ground up to make working with data simpler, more consistent, and more powerful.
Ra has relations as first-class data structures. This means cleaner, more algebraic operations, fewer pitfalls, and a language that lets you declare what you want instead of making you build nested loops to extract it.
Find the suppliers with a STATUS less than 30
S[STATUS < 30]
SNO
SNAME
STATUS
CITY
S1
Smith
20
London
S2
Jones
10
Paris
S4
Clark
20
London
For each city, show the number of suppliers
S{CITY}{*, suppliers:=count(!!S)}
suppliers
CITY
1
Athens
2
London
2
Paris
By eliminating problems — like nulls and duplicate rows — Ra enables more reliable and maintainable applications. No more wrestling with ORMs, juggling string-based queries, or dealing with edge cases from three-valued 'logic' that simply shouldn't exist. Just expressive, predictable, and efficient relational programming.
Ra isn’t ready for public testing just yet, but if you're interested in a better way to work with data, stay tuned.
Find suppliers who supply all parts
S[(!!SP){PNO} = P{PNO}]
SNO
SNAME
STATUS
CITY
S1
Smith
20
London
Find suppliers who supply the heaviest part
S &~ SP(quota(P,1,{-WEIGHT}){PNO})
SNO
SNAME
STATUS
CITY
S1
Smith
20
London
Find the lightest parts and show their supplier details plus a total quantity per part
Ra is inspired by "Databases, Types, and The Relational Model: The Third Manifesto", a book by Chris Date and Hugh Darwen.
The language is under development but is already showing some potential. On this site I'll highlight the features and progress made, though the syntax is subject to change.