Code Monkey home page Code Monkey logo

xplain2sql's Introduction

About

xplain2sql converts Xplain to various dialects of SQL. Xplain is the best and easiest data modeling language known to mankind.

xplain2sql is used to convert Xplain to various SQL dialects. It optionally also can generate a .xml description of the file, which can be used for various code generation purposes, like writing wrapper to access the data, or generating a GraphQL schema.

Usage

Convert an Xplain file:

xplain2sql -mysql example.ddl

Online demo

Try it out online.

Installation

Either download a binary or the C source tarball.

If you downloaded the tarball, you generate a binary with:

tar xvf xplain2sql-5.0.1-csrc.tar.gz
cd xplain2sql-5.0.1
make

Xplain example

Employee database example:

database employee.

# First the DDL.

base department name (A30).
base town (A30).
base name (A30).
base salary (R9,2).

type department (A3)  = department name, business_town.
type employee (A3)    = name, home_town, department, salary.

# Define some departments and employees.

insert department "D1" its
    department name = "Factory",
    business_town = "Guilding".

insert employee "E1" its
    name = "Mr. Johnson",
    home_town = "London",
    department = "D1",
    salary = 1600.

insert employee "E3" its
    name = "Mr. Test",
    home_town = "Guilding",
    department = "D1",
    salary = 1500.


# Example 1: Select data of the employee with the identification E3.

get employee "E3".

Learning Xplain

See also my Xplain page for more tools and utilities.

More about xplain2sql

The xplain2sql support page is http://www.berenddeboer.net/xplain2sql/.

There is an extensive manual covering use of the tool, its internals and many examples.

Compiling xplain2sql

Requirements, either:

  1. ISE Eiffel 19.12.

  2. Latest Gobo.

If you use ISE Eiffel, you can open src/xplain2sql.ecf with ISE Studio and compile the project.

If you use the command-line, compile with geant compile_ge to compile with Gobo or geant compile_ise to compile with ISE.

Development status

Build Status

xplain2sql's People

Contributors

berenddeboer avatar gakowalski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xplain2sql's Issues

Just a question not an issue

Sorry for posting this question as an issue and not on the mailing list, but I wonder how explain compares to the recent data manipulation language cql?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.