activefacts-examples 1.9.8 → 1.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/activefacts-examples.gemspec +2 -2
- data/cql/CinemaBookings.cql +7 -1
- data/cql/CinemaTickets.cql +6 -3
- data/cql/CompanyDirectorEmployee.cql +1 -1
- data/cql/Diplomacy.cql +2 -2
- data/cql/OilSupply.cql +3 -3
- data/cql/OneRoleNesting.cql +1 -1
- data/cql/SeparateSubtype.cql +6 -0
- data/cql/ServiceDirector.cql +13 -13
- data/cql/Supervision.cql +2 -3
- data/cql/Warehousing.cql +4 -4
- data/diagrams/json/CinemaTickets.json +7 -4
- data/diagrams/json/OilSupply.json +4 -4
- data/diagrams/json/OneRoleNesting.json +1 -1
- data/images/CinemaTickets.png +0 -0
- data/images/MultipleSubtyping.png +0 -0
- data/images/OilSupply.png +0 -0
- data/metadata/json/CinemaTickets.json +141 -149
- data/metadata/json/Metamodel.json +747 -466
- data/metadata/json/OilSupply.json +63 -63
- data/orm/Blog.orm +214 -214
- data/orm/CinemaTickets.orm +931 -962
- data/orm/ExampleModels2010.csproj +33 -0
- data/orm/MultipleSubtyping.orm +110 -9
- data/orm/OilSupply.orm +347 -353
- data/orm/Warehousing.orm +34 -22
- data/rails/models/CinemaTickets.models +5 -7
- data/rails/schema/Astronomy.schema.rb +14 -14
- data/rails/schema/CinemaBookings.schema.rb +49 -49
- data/rails/schema/CinemaTickets.schema.rb +97 -97
- data/rails/schema/Diplomacy.schema.rb +48 -48
- data/rails/schema/Metamodel.schema.rb +497 -497
- data/rails/schema/SeparateSubtype.schema.rb +18 -18
- data/rails/schema/VenueSeating.schema.rb +26 -26
- data/rails/schema/Warehousing.schema.rb +101 -101
- data/ruby/CinemaTickets.rb +7 -11
- data/ruby/OilSupply.rb +3 -3
- data/ruby/OneRoleNesting.rb +1 -1
- data/sql/server/CinemaTickets.sql +13 -13
- data/sql/server/OilSupply.sql +3 -3
- data/sql/server/OneRoleNesting.sql +6 -6
- metadata +8 -7
data/sql/server/OilSupply.sql
CHANGED
@@ -91,9 +91,9 @@ CREATE TABLE TransportRoute (
|
|
91
91
|
RefineryName varchar(80) NOT NULL,
|
92
92
|
-- Transport Route involves Region and Region has Region Name,
|
93
93
|
RegionName varchar NOT NULL,
|
94
|
-
-- Transport Route involves Transport
|
95
|
-
|
96
|
-
PRIMARY KEY(
|
94
|
+
-- Transport Route involves Transport Mode,
|
95
|
+
TransportMode varchar NOT NULL CHECK(TransportMode = 'Rail' OR TransportMode = 'Road' OR TransportMode = 'Sea'),
|
96
|
+
PRIMARY KEY(TransportMode, RefineryName, RegionName),
|
97
97
|
FOREIGN KEY (RefineryName) REFERENCES Refinery (RefineryName),
|
98
98
|
FOREIGN KEY (RegionName) REFERENCES Region (RegionName)
|
99
99
|
)
|
@@ -11,19 +11,19 @@ CREATE TABLE Party (
|
|
11
11
|
PersonDeathEventDateYmd datetime NULL,
|
12
12
|
-- maybe Party is a Person and Person is involved in Death,
|
13
13
|
PersonDied bit NULL,
|
14
|
-
-- maybe Party is a Person and Person is involved in Birth and Birth involves Event Date and Event Date has ymd,
|
15
|
-
|
14
|
+
-- maybe Party is a Person and Person is involved in Birth and Birth involves Event Date of -birth and Event Date has ymd,
|
15
|
+
PersonEventDateOfBirthYmd datetime NULL,
|
16
16
|
PRIMARY KEY(PartyId),
|
17
17
|
FOREIGN KEY (PersonAttendingDoctorId) REFERENCES Party (PartyId)
|
18
18
|
)
|
19
19
|
GO
|
20
20
|
|
21
|
-
CREATE VIEW dbo.
|
22
|
-
SELECT PersonAttendingDoctorId,
|
21
|
+
CREATE VIEW dbo.BirthInParty_PersonAttendingDoctorIdPersonEventDateOfBirthYmd (PersonAttendingDoctorId, PersonEventDateOfBirthYmd) WITH SCHEMABINDING AS
|
22
|
+
SELECT PersonAttendingDoctorId, PersonEventDateOfBirthYmd FROM dbo.Party
|
23
23
|
WHERE PersonAttendingDoctorId IS NOT NULL
|
24
|
-
AND
|
24
|
+
AND PersonEventDateOfBirthYmd IS NOT NULL
|
25
25
|
GO
|
26
26
|
|
27
|
-
CREATE UNIQUE CLUSTERED INDEX PersonMustHaveSupertypeParty ON dbo.
|
27
|
+
CREATE UNIQUE CLUSTERED INDEX PersonMustHaveSupertypeParty ON dbo.BirthInParty_PersonAttendingDoctorIdPersonEventDateOfBirthYmd(PersonAttendingDoctorId, PersonEventDateOfBirthYmd)
|
28
28
|
GO
|
29
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts-examples
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10
|
33
|
+
version: '10'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10
|
40
|
+
version: '10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- images/MetamodelER.bcp
|
209
209
|
- images/MetamodelER.pdf
|
210
210
|
- images/MultiInheritance.png
|
211
|
+
- images/MultipleSubtyping.png
|
211
212
|
- images/NorthwindER.png
|
212
213
|
- images/OilSupply.png
|
213
214
|
- images/Orienteering/Administration.png
|
@@ -385,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
385
386
|
version: '0'
|
386
387
|
requirements: []
|
387
388
|
rubyforge_project:
|
388
|
-
rubygems_version: 2.
|
389
|
+
rubygems_version: 2.6.13
|
389
390
|
signing_key:
|
390
391
|
specification_version: 4
|
391
392
|
summary: Example models for use with ActiveFacts
|