Conversion to Scala and backed by DB