Sha256: cfe4bf643947b3adb1e2027969cb65aa4cc45c4cbdd0061cd86b8cb5a9d1acf3

Contents?: true

Size: 1.27 KB

Versions: 21

Compression:

Stored size: 1.27 KB

Contents

vocabulary Diplomacy;

/*
 * Value Types
 */
CountryName is written as String;
DiplomatName is written as String;
LanguageName is written as String;

/*
 * Entity Types
 */
Country is independent identified by its Name;

Diplomat is identified by its Name;
Diplomat represents one Country (as Represented Country);
Diplomat serves in one Country (as Served Country);

Language is independent identified by its Name;

LanguageUse is where
	Language is spoken in Country,
	Country uses Language;

Ambassador is a kind of Diplomat;

Fluency is where
	Diplomat speaks at least one Language,
	Language is spoken by Diplomat;

Representation is where
	Ambassador is from Country (as Represented Country) to Country,
	Represented Country is represented in Country by one Ambassador;

/*
 * Constraints:
 */
for each Diplomat, Country at most one of these holds:
	Diplomat serves in Country,
	Diplomat represents Country;
Diplomat is an Ambassador that is from Country(1) to Country(2)
	only if Diplomat represents Country(1);
Diplomat is an Ambassador that is from Country(2) to Country(1)
	only if Diplomat serves in Country(1);
Diplomat serves in Country
	only if Diplomat speaks Language that is spoken in Country;
each Ambassador occurs at least one time in
	Ambassador is from Country(1) to Country(2);

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
activefacts-examples-1.9.8 cql/Diplomacy.cql
activefacts-examples-1.8.0 cql/Diplomacy.cql
activefacts-examples-1.7.2 cql/Diplomacy.cql
activefacts-examples-1.7.1 cql/Diplomacy.cql
activefacts-1.6.0 examples/CQL/Diplomacy.cql
activefacts-1.5.3 examples/CQL/Diplomacy.cql
activefacts-1.5.2 examples/CQL/Diplomacy.cql
activefacts-1.5.1 examples/CQL/Diplomacy.cql
activefacts-1.5.0 examples/CQL/Diplomacy.cql
activefacts-1.3.0 examples/CQL/Diplomacy.cql
activefacts-1.2.1 examples/CQL/Diplomacy.cql
activefacts-1.2.0 examples/CQL/Diplomacy.cql
activefacts-1.1.0 examples/CQL/Diplomacy.cql
activefacts-1.0.2 examples/CQL/Diplomacy.cql
activefacts-1.0.1 examples/CQL/Diplomacy.cql
activefacts-1.0.0 examples/CQL/Diplomacy.cql
activefacts-0.8.18 examples/CQL/Diplomacy.cql
activefacts-0.8.16 examples/CQL/Diplomacy.cql
activefacts-0.8.15 examples/CQL/Diplomacy.cql
activefacts-0.8.13 examples/CQL/Diplomacy.cql