|
This appendix describes the following:
BEGIN WORK;
SET CONSTRAINTS ALL DEFERRED;
CREATE TABLE ConfigurationData (
ActiveDatasetSuffixInvalid
LoggingLevelInvalid
);
CREATE TABLE GateKeepers (
);
CREATE TABLE TestRoutes (
);
CREATE TABLE TestOutputs (
);
CREATE TABLE LogEntries (
);
CREATE TABLE StringResources (
);
CREATE TABLE Filters (
);
ALTER TABLE TestOutputs ADD FOREIGN KEY (TestKey) REFERENCES TestRoutes (TestKey) DEFERRABLE;
ALTER TABLE LogEntries ADD FOREIGN KEY (TestKey) REFERENCES TestRoutes (TestKey) DEFERRABLE;
ALTER TABLE Filters ADD FOREIGN KEY (GKID) REFERENCES GateKeepers (GKID) DEFERRABLE;
COMMIT;
BEGIN WORK;
SET CONSTRAINTS ALL DEFERRED;
CREATE TABLE Carriers (
);
CREATE TABLE Carriers_1 () INHERITS (Carriers);
CREATE TABLE Carriers_2 () INHERITS (Carriers);
CREATE TABLE MatchPatterns (
);
CREATE TABLE MatchPatterns_1 () INHERITS (MatchPatterns);
CREATE TABLE MatchPatterns_2 () INHERITS (MatchPatterns);
CREATE TABLE Routes (
);
CREATE TABLE Routes_1 () INHERITS (Routes);
CREATE TABLE Routes_2 () INHERITS (Routes);
CREATE TABLE Rules (
);
CREATE TABLE Rules_1 () INHERITS (Rules);
CREATE TABLE Rules_2 () INHERITS (Rules);
CREATE TABLE Contacts (
);
CREATE TABLE Contacts_1 () INHERITS (Contacts);
CREATE TABLE Contacts_2 () INHERITS (Contacts);
CREATE TABLE Lists (
);
CREATE TABLE Lists_1 () INHERITS (Lists);
CREATE TABLE Lists_2 () INHERITS (Lists);
CREATE TABLE ContactLists (
);
CREATE TABLE ContactLists_1 () INHERITS (ContactLists);
CREATE TABLE ContactLists_2 () INHERITS (ContactLists);
CREATE TABLE RouteAttributes (
);
CREATE TABLE IngressRouteAttributes_1 () INHERITS (RouteAttributes);
CREATE TABLE IngressRouteAttributes_2 () INHERITS (RouteAttributes);
CREATE TABLE EgressRouteAttributes (
CHECK (QoS >= 1 and QoS <= 9),
) INHERITS (RouteAttributes);
CREATE TABLE EgressRouteAttributes_1 () INHERITS (EgressRouteAttributes);
CREATE TABLE EgressRouteAttributes_2 () INHERITS (EgressRouteAttributes);
CREATE TABLE QoS (
);
CREATE TABLE QoS_1 () INHERITS (QoS);
CREATE TABLE QoS_2 () INHERITS (QoS);
CREATE TABLE RouteParent (
);
CREATE TABLE IngressRoutes_1 () INHERITS (RouteParent);
CREATE TABLE IngressRoutes_2 () INHERITS (RouteParent);
CREATE TABLE EgressRoutes_1 () INHERITS (RouteParent);
CREATE TABLE EgressRoutes_2 () INHERITS (RouteParent);
COMMIT;
BEGIN WORK;
CREATE UNIQUE INDEX Carriers_1_PKey ON Carriers_1 (CarrierKey);
CREATE UNIQUE INDEX Carriers_2_PKey ON Carriers_2 (CarrierKey);
CREATE UNIQUE INDEX Carriers_1_ID ON Carriers_1 (CarrierID);
CREATE UNIQUE INDEX Carriers_2_ID ON Carriers_2 (CarrierID);
CREATE UNIQUE INDEX Patterns_1_PKey ON MatchPatterns_1 (PatternKey);
CREATE UNIQUE INDEX Patterns_2_PKey ON MatchPatterns_2 (PatternKey);
CREATE UNIQUE INDEX Routes_1_PKey ON Routes_1 (RouteKey);
CREATE UNIQUE INDEX Routes_2_PKey ON Routes_2 (RouteKey);
CREATE UNIQUE INDEX Rules_1_PKey ON Rules_1 (RuleKey);
CREATE UNIQUE INDEX Rules_2_PKey ON Rules_2 (RuleKey);
CREATE UNIQUE INDEX Contacts_1_PKey ON Contacts_1 (ContactKey);
CREATE UNIQUE INDEX Contacts_2_PKey ON Contacts_2 (ContactKey);
CREATE UNIQUE INDEX Lists_1_PKey ON Lists_1 (ListKey);
CREATE UNIQUE INDEX Lists_2_PKey ON Lists_2 (ListKey);
CREATE UNIQUE INDEX Match_1_Pattern ON MatchPatterns_1(Pattern);
CREATE UNIQUE INDEX Match_2_Pattern ON MatchPatterns_2(Pattern);
CREATE UNIQUE INDEX IRA_1_PKey ON IngressRouteAttributes_1 (AttributeKey);
CREATE UNIQUE INDEX IRA_2_PKey ON IngressRouteAttributes_2 (AttributeKey);
CREATE UNIQUE INDEX ECA_1_PKey ON EgressRouteAttributes_1 (AttributeKey);
CREATE UNIQUE INDEX ECA_2_PKey ON EgressRouteAttributes_2 (AttributeKey);
CREATE UNIQUE INDEX ContactLists_1_Key ON ContactLists_1 (ListKey, ContactKey);
CREATE UNIQUE INDEX ContactLists_2_Key ON ContactLists_2 (ListKey, ContactKey);
CREATE UNIQUE INDEX QoS_1_Key ON QoS_1 (IngressCarrierKey, EgressCarrierKey, RouteKey);
CREATE UNIQUE INDEX QoS_2_Key ON QoS_2 (IngressCarrierKey, EgressCarrierKey, RouteKey);
CREATE UNIQUE INDEX IngressRoutes_1_Key ON IngressRoutes_1 (RouteKey, AttributeKey);
CREATE UNIQUE INDEX IngressRoutes_2_Key ON IngressRoutes_2 (RouteKey, AttributeKey);
CREATE UNIQUE INDEX EgressRoutes_1_Key ON EgressRoutes_1 (RouteKey, AttributeKey);
CREATE UNIQUE INDEX EgressRoutes_2_Key ON EgressRoutes_2 (RouteKey, AttributeKey);
COMMIT;
BEGIN WORK;
ALTER TABLE Carriers_1 ADD FOREIGN KEY (RuleKey) REFERENCES Rules_1 (RuleKey) DEFERRABLE;
ALTER TABLE Carriers_1 ADD FOREIGN KEY (ListKey) REFERENCES Lists_1 (ListKey) DEFERRABLE;
ALTER TABLE Carriers_2 ADD FOREIGN KEY (RuleKey) REFERENCES Rules_2 (RuleKey) DEFERRABLE;
ALTER TABLE Carriers_2 ADD FOREIGN KEY (ListKey) REFERENCES Lists_2 (ListKey) DEFERRABLE;
ALTER TABLE ContactLists_1 ADD FOREIGN KEY (ListKey) REFERENCES Lists_1 (ListKey) DEFERRABLE;
ALTER TABLE ContactLists_1 ADD FOREIGN KEY (ContactKey) REFERENCES Contacts_1 (ContactKey) DEFERRABLE;
ALTER TABLE ContactLists_2 ADD FOREIGN KEY (ListKey) REFERENCES Lists_2 (ListKey) DEFERRABLE;
ALTER TABLE ContactLists_2 ADD FOREIGN KEY (ContactKey) REFERENCES Contacts_2 (ContactKey) DEFERRABLE;
ALTER TABLE Routes_1 ADD FOREIGN KEY (RuleKey) REFERENCES Rules_1 (RuleKey) DEFERRABLE;
ALTER TABLE Routes_2 ADD FOREIGN KEY (RuleKey) REFERENCES Rules_2 (RuleKey) DEFERRABLE;
ALTER TABLE MatchPatterns_1 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_1 (RouteKey) DEFERRABLE;
ALTER TABLE MatchPatterns_2 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_2 (RouteKey) DEFERRABLE;
ALTER TABLE Rules_1 ADD FOREIGN KEY (PreferredCarrierKey) REFERENCES Carriers_1 (CarrierKey) DEFERRABLE;
ALTER TABLE Rules_2 ADD FOREIGN KEY (PreferredCarrierKey) REFERENCES Carriers_2 (CarrierKey) DEFERRABLE;
ALTER TABLE IngressRouteAttributes_1 ADD FOREIGN KEY (CarrierKey) REFERENCES Carriers_1 (CarrierKey) DEFERRABLE;
ALTER TABLE IngressRouteAttributes_2 ADD FOREIGN KEY (CarrierKey) REFERENCES Carriers_2 (CarrierKey) DEFERRABLE;
ALTER TABLE EgressRouteAttributes_1 ADD FOREIGN KEY (CarrierKey) REFERENCES Carriers_1 (CarrierKey) DEFERRABLE;
ALTER TABLE EgressRouteAttributes_1 ADD FOREIGN KEY (ListKey) REFERENCES Lists_1 (ListKey) DEFERRABLE;
ALTER TABLE EgressRouteAttributes_2 ADD FOREIGN KEY (CarrierKey) REFERENCES Carriers_2 (CarrierKey) DEFERRABLE;
ALTER TABLE EgressRouteAttributes_2 ADD FOREIGN KEY (ListKey) REFERENCES Lists_2 (ListKey) DEFERRABLE;
ALTER TABLE QoS_1 ADD FOREIGN KEY (IngressCarrierKey) REFERENCES Carriers_1 (CarrierKey) DEFERRABLE;
ALTER TABLE QoS_1 ADD FOREIGN KEY (EgressCarrierKey) REFERENCES Carriers_1 (CarrierKey) DEFERRABLE;
ALTER TABLE QoS_1 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_1 (RouteKey) DEFERRABLE;
ALTER TABLE QoS_2 ADD FOREIGN KEY (IngressCarrierKey) REFERENCES Carriers_2 (CarrierKey) DEFERRABLE;
ALTER TABLE QoS_2 ADD FOREIGN KEY (EgressCarrierKey) REFERENCES Carriers_2 (CarrierKey) DEFERRABLE;
ALTER TABLE QoS_2 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_2 (RouteKey) DEFERRABLE;
ALTER TABLE IngressRoutes_1 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_1 (RouteKey) DEFERRABLE;
ALTER TABLE IngressRoutes_1 ADD FOREIGN KEY (AttributeKey) REFERENCES IngressRouteAttributes_1 (AttributeKey) DEFERRABLE;
ALTER TABLE IngressRoutes_2 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_2 (RouteKey) DEFERRABLE;
ALTER TABLE IngressRoutes_2 ADD FOREIGN KEY (AttributeKey) REFERENCES IngressRouteAttributes_2 (AttributeKey) DEFERRABLE;
ALTER TABLE EgressRoutes_1 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_1 (RouteKey) DEFERRABLE;
ALTER TABLE EgressRoutes_1 ADD FOREIGN KEY (AttributeKey) REFERENCES EgressRouteAttributes_1 (AttributeKey) DEFERRABLE;
ALTER TABLE EgressRoutes_2 ADD FOREIGN KEY (RouteKey) REFERENCES Routes_2 (RouteKey) DEFERRABLE;
ALTER TABLE EgressRoutes_2 ADD FOREIGN KEY (AttributeKey) REFERENCES EgressRouteAttributes_2 (AttributeKey) DEFERRABLE;
\echo Foreign Keys done...
COMMIT;
Posted: Tue Oct 1 01:19:19 PDT 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.