Download
The Constellation Query Language implementation is packaged in Ruby ActiveFacts gems. If you have Ruby installed, just say (omit "sudo" on Windows, and use a command prompt):
sudo gem install activefacts sudo gem install activefacts-compositions
The ActiveFacts generators
ActiveFacts has two framework commands which activate code generators.
afgen
is the older one, which includes the CQL generator
and various other goodies like a single-file HTML glossary generator.
schema_compositor
is from the newer activefacts-compositions
gem, and contains more advanced generators for database schemas in SQL,
and also improved generators for Ruby and Rails applications.
Some CQL Examples are provided in the CQL directory in the examples gem; search the output of
gem contents activefacts-examples
The CQL version of the Microsoft AdventureWorks database is also published here, with ORM images and files and a generated Data Vault schema.
Copy or modify the files you're interested in and you can generate code from them using commands like the following:
afgen --html/glossary OilSupply.cql afgen --sql/server Warehousing.cql schema_compositor --relational --sql/server AdventureWorks.cql afgen --cql MyModel.orm
--help tells you what generators are available. Both commands also reads .orm files from NORMA.
Installing on Windows
Use the Ruby installer from RubyInstaller. At the current time, the recommended version is 2.2.5, but you should use the latest stable version.
After opening a Windows Command prompt, check that you can enter the interactive Ruby interpreter by typing irb <ENTER>. Exit from irb (type Control-D) and you should be able to use gem install activefacts as above.
If your computer is behind a firewall, you will need to download the activefacts gem file and its dependencies including Treetop, Polyglot and Rake, and use gem install <file>.gem to install those in the reverse order. In case you find additional gems are required, search and download them at Rubygems.org.
Source Code Repository
The source code is available at GitHub. You should send bug reports there, and if you make enhancements or fix defects, send Pull Requests.
Object Role Modeling
If you want to draw your own Object Role Modeling diagrams and have a copy of Windows Visual Studio (Community edition, or standard or better only, not Express), you can freely download and install the Natural ORM Architect. The example models are available in the correct format from the examples gem. The ActiveFacts generators can process ORM files as easily as CQL files.