-- CREATE TABLE CREATE TABLE ASEXECUTION ( UIDASMARKET NUMBER(19) not null, ASMKTRUNTIME DATE not null, RUNTIMEREPEATHR CHAR(1), OPERATINGDATE DATE not null, STARTHOUR DATE not null, STARTREPEATHR CHAR(1), STOPHOUR DATE not null, STOPREPEATHR CHAR(1), LSTIME DATE ); COMMENT ON TABLE ASEXECUTION IS 'Identifies the time of execution for each SASM.'; comment on column ASEXECUTION.UIDASMARKET is 'The ERCOT Lodestar unique identifier for the ASMARKET data record.'; comment on column ASEXECUTION.ASMKTRUNTIME is 'Identifies the run time of each SASM execution.'; comment on column ASEXECUTION.RUNTIMEREPEATHR is 'Identifies if the SASM execution occurred during a DST repeat hour.'; comment on column ASEXECUTION.OPERATINGDATE is 'Operating day included in the SASM execution.'; comment on column ASEXECUTION.STARTHOUR is 'The start hour for the SASM study period.'; comment on column ASEXECUTION.STARTREPEATHR is 'Flag to indicate if the first hour of the SASM study period is the DST repeat hour.'; comment on column ASEXECUTION.STOPHOUR is 'The stop hour for the SASM study period.'; comment on column ASEXECUTION.STOPREPEATHR is 'The flag to indicate if the stop hour of the SASM study period is the DST repeat hour.'; comment on column ASEXECUTION.LSTIME is 'The data record timestamp.'; CREATE TABLE ASMARKET ( UIDASMARKET NUMBER(19) not null, ASMARKETCODE VARCHAR2(16) not null, ASMARKETNAME VARCHAR2(64) not null, UIDMARKET NUMBER(19) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE ASMARKET IS 'This table lists all available Ancillary Service market codes from DAM to SASMs 1 through 10.'; comment on column ASMARKET.UIDASMARKET is 'The ERCOT Lodestar unique identifier for the ASMARKET data record.'; comment on column ASMARKET.ASMARKETCODE is 'The ERCOT Lodestar code associated to an ASMARKET.'; comment on column ASMARKET.ASMARKETNAME is 'The ASMARKET long name.'; comment on column ASMARKET.UIDMARKET is 'The ERCOT Lodestar unique identifier for the MARKET data record.'; comment on column ASMARKET.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE BILLDETERMINANT ( UIDBILLDETERMINANT NUMBER(5) not null, BILLDETERMCODE VARCHAR2(64) not null, IDENTIFIER VARCHAR2(32) not null, BILLDETERMNAME VARCHAR2(64) not null, UOMCODE VARCHAR2(64) not null, BILLHISTCOLNAME VARCHAR2(32), AGGREGATE CHAR(1), DATATYPE VARCHAR2(64), STARTTIME DATE, STOPTIME DATE, DATAREQUIREMENT VARCHAR2(3), SEVERITY VARCHAR2(4), CMZONEFLAG CHAR(1), PUBLICEXTRACT CHAR(1), BILLDETERMTYPECODE VARCHAR2(64), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE BILLDETERMINANT IS 'Bill determinants used in the settlement process.'; comment on column BILLDETERMINANT.UIDBILLDETERMINANT is 'The ERCOT Lodestar unique identifier for the BILLDETERMINANT data record.'; comment on column BILLDETERMINANT.BILLDETERMCODE is 'The ERCOT Lodestar code associated to a BILLDETERMINANT corresponding to variables used in the ERCOT Protocols.'; comment on column BILLDETERMINANT.IDENTIFIER is 'Not applicable.'; comment on column BILLDETERMINANT.BILLDETERMNAME is 'The BILLDETERMINANT long name.'; comment on column BILLDETERMINANT.UOMCODE is 'The ERCOT Lodestar code associated to an UOM.'; comment on column BILLDETERMINANT.BILLHISTCOLNAME is 'Not applicable.'; comment on column BILLDETERMINANT.AGGREGATE is 'Not applicable.'; comment on column BILLDETERMINANT.DATATYPE is ' Not applicable. '; comment on column BILLDETERMINANT.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column BILLDETERMINANT.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column BILLDETERMINANT.DATAREQUIREMENT is 'Not applicable.'; comment on column BILLDETERMINANT.SEVERITY is ' Not applicable. '; comment on column BILLDETERMINANT.CMZONEFLAG is 'Not applicable.'; comment on column BILLDETERMINANT.PUBLICEXTRACT is 'Designates data to be sent to Market Participants = ''Y''.'; comment on column BILLDETERMINANT.BILLDETERMTYPECODE is 'Indicates what header/interval/scalar lodestar tableset the billdeterminant is found within.'; comment on column BILLDETERMINANT.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE CCCONFIGURATION ( UIDCONFIGURATION NUMBER(19) not null, CONFIGCODE VARCHAR2(64) not null, CONFIGID VARCHAR2(6) not null, GENCODE VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE CCCONFIGURATION IS 'This table lists all of the registered Combined Cycle Configurations,'; comment on column CCCONFIGURATION.UIDCONFIGURATION is 'The ERCOT Lodestar unique identifier for the CCCONFIGURATION data record.'; comment on column CCCONFIGURATION.CONFIGCODE is 'The ERCOT Lodestar code associated to a CCCONFIGURATION.'; comment on column CCCONFIGURATION.CONFIGID is 'An index which is the configuration number concatenated at the end of the CONFIGCODE.'; comment on column CCCONFIGURATION.GENCODE is 'The ERCOT Lodestar code associated to a GENERATOR which is a combined cycle train.'; comment on column CCCONFIGURATION.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column CCCONFIGURATION.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column CCCONFIGURATION.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE CMZONE ( CMZONECODE VARCHAR2(64) not null, CMZONENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE CMZONE IS 'This table describes the ERCOT defined Congestion Management Zones found in ERCOTs territory.'; comment on column CMZONE.CMZONECODE is 'The ERCOT Lodestar code associated to an ERCOT congestion management zone.'; comment on column CMZONE.CMZONENAME is 'The CMZONE long name.'; comment on column CMZONE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column CMZONE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column CMZONE.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; -- CREATE TABLE CREATE TABLE CRRACCTHOLDER ( CRRACCTHLDRCODE NUMBER(19) not null, CRRACCTHLDRNAME VARCHAR2(64) not null, DUNSNUMBER VARCHAR2(64) not null, UIDACCOUNT NUMBER(19) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE CRRACCTHOLDER IS 'This table lists Congestion Revenue Rights (CRR) Account Holders and dunsnumbers.'; comment on column CRRACCTHOLDER.CRRACCTHLDRCODE is 'The ERCOT Lodestar code associated to a CRRACCTHOLDER.'; comment on column CRRACCTHOLDER.CRRACCTHLDRNAME is 'The CRRACCTHOLDER long name.'; comment on column CRRACCTHOLDER.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; comment on column CRRACCTHOLDER.UIDACCOUNT is 'The ERCOT Lodestar unique identifier for the ACCOUNT data record.'; comment on column CRRACCTHOLDER.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column CRRACCTHOLDER.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column CRRACCTHOLDER.LSTIME is 'The data record timestamp.'; -- CREATE TABLE -- Create table create table CRRAUCTION ( UIDCRRAUCTION NUMBER(19) not null, CRRAUCTIONCODE VARCHAR2(8), CRRAUCTIONNAME VARCHAR2(64), CRRAUCTIONTYPE VARCHAR2(64), LSTIME DATE, CRRAUCTIONDATE DATE, EFFECTIVEPERIOD DATE, UIDINVOICESCHEDULE NUMBER(19) ); -- CREATE TABLE comment comment on table CRRAUCTION is 'Lists the Congestion Revenue Rights Auctions held by type (annual/monthly) and Month'; comment on column CRRAUCTION.UIDCRRAUCTION is 'Not supplied by source'; comment on column CRRAUCTION.CRRAUCTIONCODE is 'Not supplied by source'; comment on column CRRAUCTION.CRRAUCTIONNAME is 'Not supplied by source'; comment on column CRRAUCTION.CRRAUCTIONTYPE is 'Not supplied by source'; comment on column CRRAUCTION.LSTIME is 'The data record timestamp.'; comment on column CRRAUCTION.CRRAUCTIONDATE is 'Not supplied by source'; comment on column CRRAUCTION.EFFECTIVEPERIOD is 'Not supplied by source'; CREATE TABLE CRRSETLPOINT ( UIDRESOURCE NUMBER(19) not null, UIDSETLPOINT NUMBER(19) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE, QUEUE_STATUS CHAR(1) ); -- CREATE TABLE comment comment on table CRRSETLPOINT is 'Table will connect a physical resource and settlement point associated with Private Use Networks and CC Physical Units in order to link to the Fuel type Category needed for CRR MINRESPR and MAXRESPR'; comment on column CRRSETLPOINT.UIDRESOURCE is 'The ERCOT Lodestar unique identifier for the RESOURCENODAL data record.'; comment on column CRRSETLPOINT.UIDSETLPOINT is 'The ERCOT Lodestar unique identifier for the SETTLEMENTPOINT data record.'; comment on column CRRSETLPOINT.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column CRRSETLPOINT.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column CRRSETLPOINT.LSTIME is 'The data record timestamp.'; comment on column CRRSETLPOINT.QUEUE_STATUS is 'Not supplied by source'; -- CREATE TABLE CREATE TABLE DCTIE ( DCTIECODE VARCHAR2(64) not null, DCTIENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE DCTIE IS 'A direct current non-synchronous transmission connection between ERCOT and non-ERCOT electric power systems.'; comment on column DCTIE.DCTIECODE is 'The ERCOT Lodestar code associated to a DCTIE.'; comment on column DCTIE.DCTIENAME is 'The DCTIE long name.'; comment on column DCTIE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column DCTIE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column DCTIE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE ELEMENT ( UIDELEMENT NUMBER(19) not null, ELEMENTCODE VARCHAR2(20) not null, ELEMENTNAME VARCHAR2(64) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE ELEMENT IS 'This table lists the pre-defined directional network elements, as considered by the CRR Settlements process.'; comment on column ELEMENT.UIDELEMENT is 'The ERCOT Lodestar unique identifier for the ELEMENT data record.'; comment on column ELEMENT.ELEMENTCODE is 'The ERCOT Lodestar code associated to an ELEMENT.'; comment on column ELEMENT.ELEMENTNAME is 'The ELEMENT long name.'; comment on column ELEMENT.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE FACTOR ( UIDFACTOR NUMBER(19) not null, OPCOCODE VARCHAR2(64), JURISCODE VARCHAR2(64), FACTORCODE VARCHAR2(64) not null, FACTORNAME VARCHAR2(64) not null, UOMCODE VARCHAR2(64), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE FACTOR IS 'This table represents various factor names that can be used in various calculations performed by Lodestar applications. These can range from tax rates, to flat charges, to charges associated with block rates.'; comment on column FACTOR.UIDFACTOR is 'The ERCOT Lodestar unique identifier for the FACTOR data record.'; comment on column FACTOR.OPCOCODE is 'The ERCOT Lodestar code associated to an OPERATINGCOMPANY.'; comment on column FACTOR.JURISCODE is 'The ERCOT Lodestar code associated to a JURISDICTION.'; comment on column FACTOR.FACTORCODE is 'The ERCOT Lodestar code associated to a FACTOR.'; comment on column FACTOR.FACTORNAME is 'The FACTOR long name.'; comment on column FACTOR.UOMCODE is 'The ERCOT Lodestar code associated to an UOMCODE.'; comment on column FACTOR.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE FACTORVALUE ( UIDFACTOR NUMBER(19) not null, STARTTIME DATE not null, VAL FLOAT, PRORATEMETHOD CHAR(1), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE FACTORVALUE IS 'This table represents the values and their effective date for the various factor names that can be used in various calculations performed by Lodestar applications. These can range from tax rates, to flat charges, to charges associated with block rates.'; comment on column FACTORVALUE.UIDFACTOR is 'The ERCOT Lodestar unique identifier for the FACTOR data record.'; comment on column FACTORVALUE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column FACTORVALUE.VAL is 'The value for the variable.'; comment on column FACTORVALUE.PRORATEMETHOD is 'Not applicable.'; comment on column FACTORVALUE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE FLOWGATE ( UIDFLOWGATE NUMBER(19) not null, FLOWGATECODE VARCHAR2(8) not null, FLOWGATENAME VARCHAR2(64) not null, UIDFLOWGATECALC NUMBER(19) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE FLOWGATE IS 'This table lists the available flowgates.'; comment on column FLOWGATE.UIDFLOWGATE is 'The ERCOT Lodestar unique identifier for the FLOWGATE data record.'; comment on column FLOWGATE.FLOWGATECODE is 'The ERCOT Lodestar code associated to a FLOWGATE.'; comment on column FLOWGATE.FLOWGATENAME is 'The FLOWGATE long name.'; comment on column FLOWGATE.UIDFLOWGATECALC is 'The ERCOT Lodestar code associated to a flowgate calculation group.'; comment on column FLOWGATE.LSTIME is 'The data record timestamp.'; CREATE TABLE FLOWGATECALC ( UIDFLOWGATECALC NUMBER(19) NOT NULL, FLOWGATECALC VARCHAR2(64) NOT NULL, DESCRIPTION VARCHAR2(254), LSTIME DATE ); --CREATE TABLE comment COMMENT ON TABLE FLOWGATECALC IS 'This table identifies the association of an individual flowgate to a calculation group.'; Comment on column FLOWGATECALC.UIDFLOWGATECALC is 'The ERCOT Lodestar unique identifier for the FLOWGATECALC data record.'; Comment on column FLOWGATECALC.FLOWGATECALC is 'Identifies what calculation group the flowgate belongs to.'; Comment on column FLOWGATECALC.DESCRIPTION is 'Long description for the FLOWGATECALC record.'; Comment on column FLOWGATECALC.LSTIME is 'The data record timestamp.'; CREATE TABLE FUELTYPECAT ( UIDFUELTYPECAT NUMBER(19) not null, FUELTYPECAT VARCHAR2(64) not null, DESCRIPTION VARCHAR2(254) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE FUELTYPECAT IS 'This table lists all the Fuel Type Categories.'; comment on column FUELTYPECAT. UIDFUELTYPECAT is ' The ERCOT system's unique identifier for the FUELTYPECAT data record. '; comment on column FUELTYPECAT. FUELTYPECAT is 'The code for the fuel type category .'; comment on column FUELTYPECAT. DESCRIPTION is 'Long description of the fuel type category .'; comment on column FUELTYPECAT.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE GENERATOR ( GENCODE VARCHAR2(64) not null, GENNAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE, COMBINEDCYCLE VARCHAR2(3) ); -- CREATE TABLE comment COMMENT ON TABLE GENERATOR IS 'This table lists Generator and Combined Cycle Plant Resources.'; comment on column GENERATOR.GENCODE is 'The ERCOT Lodestar code associated to a GENERATOR.'; comment on column GENERATOR.GENNAME is 'The GENERATOR long name.'; comment on column GENERATOR.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column GENERATOR.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column GENERATOR.LSTIME is 'The data record timestamp.'; comment on column GENERATOR.COMBINEDCYCLE is 'Indicates if the Generator is a Combined Cycle Plant.'; CREATE TABLE GENHISTSETTLEMENT ( STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE, UIDFUELTYPECAT NUMBER(19), UIDRESOURCE NUMBER(19) not null ); -- CREATE TABLE comment comment on table GENHISTSETTLEMENT is 'Table lists fueltype categories associated to Generators'; comment on column GENHISTSETTLEMENT.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column GENHISTSETTLEMENT.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column GENHISTSETTLEMENT.LSTIME is 'The data record timestamp.'; comment on column GENHISTSETTLEMENT.UIDFUELTYPECAT is 'Not supplied by source'; comment on column GENHISTSETTLEMENT.UIDRESOURCE is 'The ERCOT Lodestar unique identifier for the RESOURCENODAL data record.'; -- CREATE TABLE CREATE TABLE GENERATORSITE ( GENSITECODE VARCHAR2(64) not null, GENSITENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDRESS VARCHAR2(254), STATE VARCHAR2(64), COUNTY VARCHAR2(64), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE GENERATORSITE IS 'This table lists Generator Sites.'; comment on column GENERATORSITE.GENSITECODE is 'The ERCOT Lodestar code associated to a GENERATORSITE.'; comment on column GENERATORSITE.GENSITENAME is 'The GENERATORSITE long name.'; comment on column GENERATORSITE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column GENERATORSITE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column GENERATORSITE.ADDRESS is 'GENERATORSITE street address.'; comment on column GENERATORSITE.STATE is 'GENERATORSITE state.'; comment on column GENERATORSITE.COUNTY is 'GENERATORSITE county.'; comment on column GENERATORSITE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE LOSSCLASS ( LOSSCODE VARCHAR2(64) not null, LOSSNAME VARCHAR2(64) not null, STARTTIME DATE, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE LOSSCLASS IS 'NULL'; comment on column LOSSCLASS.LOSSCODE is 'The ERCOT Lodestar code associated to a LOSSCLASS.'; comment on column LOSSCLASS.LOSSNAME is 'The LOSSCLASS long name.'; comment on column LOSSCLASS.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column LOSSCLASS.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column LOSSCLASS.LSTIME is 'The data record timestamp.'; -- Create table create table METHOD ( DESCRIPTION VARCHAR2(64), LSTIME DATE, METHOD VARCHAR2(8) not null ); -- CREATE TABLE comment comment on table METHOD is 'Not supplied by source'; comment on column METHOD.METHOD is 'Not supplied by source'; comment on column METHOD.DESCRIPTION is 'Not supplied by source'; comment on column METHOD.LSTIME is 'Not supplied by source'; -- Create/Recreate indexes -- CREATE TABLE CREATE TABLE MKTCONSTRAINT ( MKTCONSTRAINTCODE NUMBER(19) not null, MKTCONSTRAINTNAME VARCHAR2(64) not null, MKTCONTINGENCYNAME VARCHAR2(64) not null, FROMSTATION VARCHAR2(64), FROMKV VARCHAR2(64), TOSTATION VARCHAR2(64), TOKV VARCHAR2(64), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE MKTCONSTRAINT IS 'This table lists the violated constraint/contingency combinations out of DAM SFT, as considered by the CRR Settlements process. Data is primed based on the first results out of SFT; subsequent SFT results will populate only the incremental constraint/contingency combinations.'; comment on column MKTCONSTRAINT.MKTCONSTRAINTCODE is 'The ERCOT Lodestar code associated to a MKCONSTRAINT.'; comment on column MKTCONSTRAINT.MKTCONSTRAINTNAME is 'The name of the constraint associated with the violated constraint/contingency.'; comment on column MKTCONSTRAINT.MKTCONTINGENCYNAME is 'The name of the contingency associated with the violated constraint/contingency.'; comment on column MKTCONSTRAINT.FROMSTATION is 'Constraint directional identifier'; comment on column MKTCONSTRAINT.FROMKV is 'Constraint directional identifier'; comment on column MKTCONSTRAINT.TOSTATION is 'Constraint directional identifier'; comment on column MKTCONSTRAINT.TOKV is 'Constraint directional identifier'; comment on column MKTCONSTRAINT.LSTIME is 'The data record timestamp.'; --CREATE TABLE CREATE TABLE MRE ( MRECODE VARCHAR2(64) not null, MRENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE, DUNSNUMBER VARCHAR2(64) not null ); -- CREATE TABLE comment COMMENT ON TABLE MRE IS 'This table lists Meter Reading Entities (MRE) and DUNS numbers.'; comment on column MRE.MRECODE is 'The ERCOT Lodestar code associated to a MRE.'; comment on column MRE.MRENAME is 'The MRE long name.'; comment on column MRE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column MRE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column MRE.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; comment on column MRE.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; -- CREATE TABLE CREATE TABLE NOIE ( NOIECODE VARCHAR2(64) not null, NOIENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE NOIE IS 'This table lists Non-Opt in Entities(NOIEs).'; comment on column NOIE.NOIECODE is 'The ERCOT Lodestar code associated to a NOIE.'; comment on column NOIE.NOIENAME is 'The NOIE long name.'; comment on column NOIE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column NOIE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column NOIE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE PGC ( PGCCODE VARCHAR2(64) not null, PGCNAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE, DUNSNUMBER VARCHAR2(64) not null ); -- CREATE TABLE comment COMMENT ON TABLE PGC IS 'This table lists Power Generator Companies(PGCs) and dunsnumbers.'; comment on column PGC.PGCCODE is 'The ERCOT Lodestar code associated to a PGC.'; comment on column PGC.PGCNAME is 'The PGC long name.'; comment on column PGC.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column PGC.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column PGC.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; comment on column PGC.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; -- CREATE TABLE CREATE TABLE PROFILECLASS ( PROFILECODE VARCHAR2(64) not null, WEATHERSENSITIVITY VARCHAR2(3) not null, METERTYPE VARCHAR2(4) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE, TOUTYPE VARCHAR2(64) not null, PROFILECUTCODE VARCHAR2(64) not null ); -- CREATE TABLE comment COMMENT ON TABLE PROFILECLASS IS 'The PROFILECLASS table identifies the components of profile codes, including weather zone, meter type, weather sensitivity and time of use code. Refer to the Profile Decision Tree on the ERCOT website for additional details.'; comment on column PROFILECLASS.PROFILECODE is 'The ERCOT Lodestar code associated to a PROFILECLASS.'; comment on column PROFILECLASS.WEATHERSENSITIVITY is 'Indicates the weather sensitivity of the profile code as WS (weather sensitive) or NWS (non-weather sensitive).'; comment on column PROFILECLASS.METERTYPE is 'Indicates the meter type of the profile code as NIDR (non-interval) or IDR (interval).'; comment on column PROFILECLASS.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column PROFILECLASS.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column PROFILECLASS.ADDTIME is 'The data record timestamp.'; comment on column PROFILECLASS.TOUTYPE is 'Indicates the Time Of Use type of the profile code in association to a TOU schedule or NOTOU.'; comment on column PROFILECLASS.PROFILECUTCODE is 'Concatenated components of the profile code including the profile type and the weather zone.'; -- CREATE TABLE CREATE TABLE PROFILECUT ( PROFILECUTCODE VARCHAR2(64) not null, PROFILETYPECODE VARCHAR2(64) not null, WEATHERZONECODE VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE PROFILECUT IS 'This table lists concatenated combinations and components of the PROFILECODE.'; comment on column PROFILECUT.PROFILECUTCODE is 'The ERCOT Lodestar code associated to a PROFILECUT.'; comment on column PROFILECUT.PROFILETYPECODE is 'Indicates the profile type of the profile code as defined by the Profile Decision Tree.'; comment on column PROFILECUT.WEATHERZONECODE is 'Indicates the weather zone of the profile code.'; comment on column PROFILECUT.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column PROFILECUT.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column PROFILECUT.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE PROFILETYPE ( PROFILETYPECODE VARCHAR2(64) not null, PROFILETYPENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE, DRGTYPE VARCHAR2(16) ); -- CREATE TABLE comment COMMENT ON TABLE PROFILETYPE IS 'This table lists the available PROFILETYPEs.'; comment on column PROFILETYPE.PROFILETYPECODE is 'The ERCOT Lodestar code associated to a PROFILETYPE.'; comment on column PROFILETYPE.PROFILETYPENAME is 'The PROFILETYPE long name.'; comment on column PROFILETYPE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column PROFILETYPE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column PROFILETYPE.LSTIME is 'The data record timestamp.'; comment on column PROFILETYPE.DRGTYPE is 'Indicates the Distributed Renewable Generation component of the PROFILETYPECODE.'; -- Create table create table PROXYDAY ( ADDTIME DATE, ESIIDCOUNT NUMBER(10), LSTIME DATE, ORDERNUM NUMBER(10), PROXYDAY DATE not null, PROXYDAYTYPE VARCHAR2(64) not null, SETTLEMENTTIME DATE not null, SETTLEMENTTYPE VARCHAR2(64) not null, WEATHERCODE VARCHAR2(64) not null, WEATHERZONE VARCHAR2(64) not null ); -- CREATE TABLE comment comment on table PROXYDAY is 'Not supplied by source'; comment on column PROXYDAY.SETTLEMENTTYPE is 'Not supplied by source'; comment on column PROXYDAY.SETTLEMENTTIME is 'Not supplied by source'; comment on column PROXYDAY.WEATHERCODE is 'Not supplied by source'; comment on column PROXYDAY.WEATHERZONE is 'Not supplied by source'; comment on column PROXYDAY.PROXYDAY is 'Not supplied by source'; comment on column PROXYDAY.ESIIDCOUNT is 'Not supplied by source'; comment on column PROXYDAY.ADDTIME is 'Not supplied by source'; comment on column PROXYDAY.PROXYDAYTYPE is 'Not supplied by source'; comment on column PROXYDAY.ORDERNUM is 'Not supplied by source'; comment on column PROXYDAY.LSTIME is 'Not supplied by source'; -- CREATE TABLE CREATE TABLE QSE ( QSECODE VARCHAR2(64) not null, QSENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, UIDACCOUNT NUMBER(19), DUNSNUMBER VARCHAR2(64) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE QSE IS 'Any participant that is qualified by the ISO to submit schedules and ancillary services bids. Requirements of qualifications may include technical and financial criteria (e.g., credit worthiness, twenty-four hour operation, specific communication capabilities). A QSE may be a load service entity, generating resource provider, power marketer, or may be an agent of any combination of these entities. Only a QSE may submit schedules and ancillary services bids to the ISO.'; comment on column QSE.QSECODE is 'The ERCOT Lodestar code associated to a QSE.'; comment on column QSE.QSENAME is 'The company name used by the qualified scheduling entity as registered at ERCOT.'; comment on column QSE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column QSE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column QSE.UIDACCOUNT is 'The ERCOT Lodestar unique identifier for the ACCOUNT data record.'; comment on column QSE.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; comment on column QSE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE REP ( REPCODE VARCHAR2(64) not null, REPNAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE, DUNSNUMBER VARCHAR2(64) not null ); -- CREATE TABLE comment COMMENT ON TABLE REP IS 'This table lists Load Serving Entities (LSE) and DUNS number.'; comment on column REP.REPCODE is 'The ERCOT Lodestar code associated to a REP.'; comment on column REP.REPNAME is 'The REP long name.'; comment on column REP.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column REP.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column REP.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; comment on column REP.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; -- Added the below tables on March 2nd, 2008. -- CREATE TABLE CREATE TABLE RESOURCENODAL ( UIDRESOURCE NUMBER(19) not null, RESOURCECODE VARCHAR2(64) not null, RESOURCETYPE VARCHAR2(64) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE RESOURCENODAL IS 'This table provides a single point of access for everything settled generically as a resource including generators, combined cycle trains, combined cycle configurations, and load resources.'; comment on column RESOURCENODAL.UIDRESOURCE is 'The ERCOT Lodestar unique identifier for the RESOURCENODAL data record.'; comment on column RESOURCENODAL.RESOURCECODE is 'The ERCOT Lodestar code associated to a RESOURCE.'; comment on column RESOURCENODAL.RESOURCETYPE is 'Indicates whether the resource is a generator, combined cycle train-plant, combined cycle configuration, or load resource.'; comment on column RESOURCENODAL.LSTIME is 'The data record timestamp.'; CREATE TABLE RUCPROCESSHISTORY ( RUCID NUMBER(3) not null, OPERATINGDATE DATE not null, PROCESSTIME DATE, CSTPROCESSTIME DATE, PROCESSTIMEDSTFLAG VARCHAR2(1), STUDYPERIODSTART DATE, STUDYPERIODDSTFLAG VARCHAR2(1), STUDYPERIODEND DATE, LSTIME DATE, QUEUE_STATUS CHAR(1) ); -- CREATE TABLE comment COMMENT ON TABLE RUCPROCESSHISTORY is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.RUCID is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.OPERATINGDATE is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.PROCESSTIME is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.CSTPROCESSTIME is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.PROCESSTIMEDSTFLAG is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.STUDYPERIODSTART is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.STUDYPERIODDSTFLAG is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.STUDYPERIODEND is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.LSTIME is 'Not supplied by source'; comment on column RUCPROCESSHISTORY.QUEUE_STATUS is 'Not supplied by source'; -- CREATE TABLE CREATE TABLE SETLPOINTHISTORY ( UIDSETLPOINT NUMBER(19) not null, STARTTIME DATE not null, STOPTIME DATE, UIDSETLPOINTTYPE NUMBER(19) not null, CMZONECODE VARCHAR2(64), LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE SETLPOINTHISTORY IS 'This table captures historical changes in the relationships between a Settlement Point and its descriptive attributes.'; comment on column SETLPOINTHISTORY.UIDSETLPOINT is 'The ERCOT Lodestar unique identifier for the SETTLEMENTPOINT data record.'; comment on column SETLPOINTHISTORY.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column SETLPOINTHISTORY.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column SETLPOINTHISTORY.UIDSETLPOINTTYPE is 'The ERCOT Lodestar unique identifier for the SETLPOINTTYPE data record. '; comment on column SETLPOINTHISTORY.CMZONECODE is 'The ERCOT Lodestar code associated to a CMZONE.'; comment on column SETLPOINTHISTORY.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE SETLPOINTTYPE ( UIDSETLPOINTTYPE NUMBER(19) not null, SETLPOINTTYPE VARCHAR2(8) not null, DESCRIPTION VARCHAR2(64) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE SETLPOINTTYPE IS 'This table lists the ERCOT defined categories for Settlement Points.'; comment on column SETLPOINTTYPE.UIDSETLPOINTTYPE is 'The ERCOT Lodestar unique identifier for the SETLPOINTTYPE data record.'; comment on column SETLPOINTTYPE.SETLPOINTTYPE is 'The ERCOT Lodestar code that represents a specific Settlement Point category.'; comment on column SETLPOINTTYPE.DESCRIPTION is 'The Protocol defined name of each category of Settlement Points.'; comment on column SETLPOINTTYPE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE SETTLEMENTPOINT ( UIDSETLPOINT NUMBER(19) not null, SETLPOINTCODE VARCHAR2(12) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE SETTLEMENTPOINT IS 'This table lists all ERCOT Resource Nodes, Load Zones, and Hubs where energy and capacity are settled.'; comment on column SETTLEMENTPOINT.UIDSETLPOINT is 'The ERCOT Lodestar unique identifier for the SETTLEMENTPOINT data record.'; comment on column SETTLEMENTPOINT.SETLPOINTCODE is 'Settlement Point name which is used throughout ERCOT systems'; comment on column SETTLEMENTPOINT.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE STARTTYPE ( STARTTYPE NUMBER(10) not null, DESCRIPTION VARCHAR2(64) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE STARTTYPE IS 'This table provides lookup values for categories of startup costs provided in a Three-Part Supply Offer.'; comment on column STARTTYPE.STARTTYPE is 'The ERCOT Lodestar numeric code that represents a specific starttype category.'; comment on column STARTTYPE.DESCRIPTION is 'The name of each startup cost category.'; comment on column STARTTYPE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE STATION ( STATIONCODE VARCHAR2(64) not null, STATIONNAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE STATION IS 'Lists the the physical electric substation locations that exists in the ERCOT Network Model.'; comment on column STATION.STATIONCODE is 'The ERCOT Lodestar code associated to a STATION.'; comment on column STATION.STATIONNAME is 'The STATION long name.'; comment on column STATION.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column STATION.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column STATION.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; -- CREATE TABLE CREATE TABLE STATIONSERVICEHIST ( STATIONCODE VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, UFEZONECODE VARCHAR2(64) not null, CMZONECODE VARCHAR2(64), ADDTIME DATE, SUBUFECODE VARCHAR2(64), UIDSETLPOINT NUMBER(19) ); -- CREATE TABLE comment COMMENT ON TABLE STATIONSERVICEHIST IS 'Provides the STATION attributes including: associating load (ESIID) and generation (resources) to CM zones and UFE zones and for NODAL, associating load (ESIID) to their settlementpoints.'; comment on column STATIONSERVICEHIST.STATIONCODE is 'The ERCOT Lodestar code associated to a STATION.'; comment on column STATIONSERVICEHIST.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column STATIONSERVICEHIST.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column STATIONSERVICEHIST.UFEZONECODE is 'The ERCOT Lodestar code associated to an UFEZONECODE. The STATIONSERVICEHIST.UFEZONECODE is U1.'; comment on column STATIONSERVICEHIST.CMZONECODE is 'The ERCOT Lodestar code associated to a CMZONE. See CMZONE table.'; comment on column STATIONSERVICEHIST.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; comment on column STATIONSERVICEHIST.SUBUFECODE is 'The ERCOT Lodestar code identifying an analysis subzone of electerically connected area where the total generation is compared to the total load and variences attributed to Unaccounted For Energy (UFE).'; comment on column STATIONSERVICEHIST.UIDSETLPOINT is 'The ERCOT Lodestar unique identifier for a settlementpoint.'; -- CREATE TABLE CREATE TABLE TDSP ( TDSPCODE VARCHAR2(64) not null, TDSPNAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, ADDTIME DATE, DUNSNUMBER VARCHAR2(64) not null, NOIECODE VARCHAR2(64) ); -- CREATE TABLE comment COMMENT ON TABLE TDSP IS 'Any entity under the jurisdiction of the PUCT and registered with ERCOT that owns and maintains a transmission or distribution system for the delivery of energy to and from the grid including a municipal or coop.'; comment on column TDSP.TDSPCODE is 'The ERCOT Lodestar code associated to a TDSP.'; comment on column TDSP.TDSPNAME is 'The TDSP long name.'; comment on column TDSP.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column TDSP.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column TDSP.ADDTIME is 'This timestamp represents the date and time when a new row is added or a column value in an existing row is updated.'; comment on column TDSP.DUNSNUMBER is 'Uniquely identifies the market participant as registered at ERCOT.'; comment on column TDSP.NOIECODE is 'The ERCOT Lodestar unique code associated to TDSPs that are registered with ERCOT as a non opt-in entity (NOIE).'; -- CREATE TABLE CREATE TABLE UFEZONE ( UFEZONECODE VARCHAR2(64) not null, UFEZONENAME VARCHAR2(64) not null, STARTTIME DATE not null, STOPTIME DATE, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE UFEZONE IS 'NULL'; comment on column UFEZONE.UFEZONECODE is 'The ERCOT Lodestar code associated to an UFEZONE.'; comment on column UFEZONE.UFEZONENAME is 'The UFEZONE long name.'; comment on column UFEZONE.STARTTIME is 'Represents the date and time when the data record takes effect.'; comment on column UFEZONE.STOPTIME is 'Represents the date and time when a data record is effective through.'; comment on column UFEZONE.LSTIME is 'The data record timestamp.'; -- CREATE TABLE CREATE TABLE UOM ( UOMCODE VARCHAR2(64) not null, UOMNAME VARCHAR2(64) not null, UNIT VARCHAR2(64) not null, AGGREGATE CHAR(1) not null, TODEMAND NUMBER(5), TOTALIZE CHAR(1) not null, LSTIME DATE ); -- CREATE TABLE comment COMMENT ON TABLE UOM IS 'This table lists unit of measure (UOM).'; comment on column UOM.UOMCODE is 'The ERCOT Lodestar code associated to an UOM.'; comment on column UOM.UOMNAME is 'The UOM long name.'; comment on column UOM.UNIT is ' The UOM name.'; comment on column UOM.AGGREGATE is 'Not applicable.'; comment on column UOM.TODEMAND is 'Not applicable.'; comment on column UOM.TOTALIZE is 'Not applicable.'; comment on column UOM.LSTIME is 'The data record timestamp.'; -- Create/Recreate primary, unique and foreign key constraints ALTER TABLE ASMARKET ADD CONSTRAINT PK_ASMARKET primary key (UIDASMARKET); ALTER TABLE BILLDETERMINANT ADD CONSTRAINT PK_BILLDET primary key (UIDBILLDETERMINANT); ALTER TABLE CRRSETLPOINT ADD CONSTRAINT PK_CRRSETLPOINT primary key (UIDRESOURCE,UIDSETLPOINT,STARTTIME); ALTER TABLE GENHISTSETTLEMENT ADD CONSTRAINT PK_GENHISTSETTLEMENT primary key (UIDRESOURCE,STARTTIME); ALTER TABLE CMZONE ADD CONSTRAINT PK_CMZONE primary key (CMZONECODE); ALTER TABLE CRRACCTHOLDER ADD CONSTRAINT PK_CRRACCTH primary key (CRRACCTHLDRCODE); ALTER TABLE CRRAUCTION ADD CONSTRAINT PK_CRRAUCT primary key (UIDCRRAUCTION); ALTER TABLE DCTIE ADD CONSTRAINT PK_DCTIE primary key (DCTIECODE); ALTER TABLE ELEMENT ADD CONSTRAINT PK_ELEMENT primary key (UIDELEMENT); ALTER TABLE FACTOR ADD CONSTRAINT PK_FACTOR primary key (UIDFACTOR); ALTER TABLE FACTORVALUE ADD CONSTRAINT PK_FACTVAL primary key (UIDFACTOR,STARTTIME); ALTER TABLE FACTORVALUE ADD CONSTRAINT FK_FACTVAL_FACT foreign key (UIDFACTOR) REFERENCES FACTOR (UIDFACTOR) on delete cascade; ALTER TABLE FLOWGATE ADD CONSTRAINT PK_FLOWGATE primary key (UIDFLOWGATE); ALTER TABLE GENERATOR ADD CONSTRAINT PK_GENRTR primary key (GENCODE); ALTER TABLE GENERATORSITE ADD CONSTRAINT PK_GENSITE primary key (GENSITECODE); ALTER TABLE LOSSCLASS ADD CONSTRAINT PK_LSCLASS primary key (LOSSCODE); ALTER TABLE MKTCONSTRAINT ADD CONSTRAINT PK_MKTCONST primary key (MKTCONSTRAINTCODE); ALTER TABLE MRE ADD CONSTRAINT PK_MRE primary key (MRECODE); ALTER TABLE NOIE ADD CONSTRAINT PK_NOIE primary key (NOIECODE); ALTER TABLE PGC ADD CONSTRAINT PK_PGC primary key (PGCCODE); ALTER TABLE PROFILECLASS ADD CONSTRAINT PK_PROFCLAS primary key (PROFILECODE); ALTER TABLE PROFILECUT ADD CONSTRAINT PK_PROFCUT primary key (PROFILECUTCODE); ALTER TABLE PROFILETYPE ADD CONSTRAINT PK_PROFTYPE primary key (PROFILETYPECODE); ALTER TABLE QSE ADD CONSTRAINT PK_QSE primary key (QSECODE); ALTER TABLE REP ADD CONSTRAINT PK_REP primary key (REPCODE); ALTER TABLE RUCPROCESSHISTORY ADD CONSTRAINT PK_RUCPROC primary key (RUCID,OPERATINGDATE); ALTER TABLE SETTLEMENTPOINT ADD CONSTRAINT PK_SETLPNT primary key (UIDSETLPOINT); ALTER TABLE STATION ADD CONSTRAINT PK_STATION primary key (STATIONCODE); ALTER TABLE STATIONSERVICEHIST ADD CONSTRAINT PK_STNSERH primary key (STATIONCODE,STARTTIME); ALTER TABLE STATIONSERVICEHIST ADD CONSTRAINT FK_STNSERH_CZCODE foreign key (CMZONECODE) REFERENCES CMZONE (CMZONECODE); ALTER TABLE STATIONSERVICEHIST ADD CONSTRAINT FK_STNSERH_SCODE foreign key (STATIONCODE) REFERENCES STATION (STATIONCODE) on delete cascade; ALTER TABLE STATIONSERVICEHIST ADD CONSTRAINT FK_STSVHIST_SETLPNT foreign key (UIDSETLPOINT) REFERENCES SETTLEMENTPOINT (UIDSETLPOINT); ALTER TABLE TDSP ADD CONSTRAINT PK_TDSP primary key (TDSPCODE); ALTER TABLE TDSP ADD CONSTRAINT FK_TDSP_NOIE foreign key (NOIECODE) REFERENCES NOIE (NOIECODE); ALTER TABLE UFEZONE ADD CONSTRAINT PK_UFEZONE primary key (UFEZONECODE); ALTER TABLE PROFILECLASS ADD CONSTRAINT FK_PROFILE_PROFCUT foreign key (PROFILECUTCODE) REFERENCES PROFILECUT (PROFILECUTCODE); ALTER TABLE PROFILECUT ADD CONSTRAINT FK_PROFCUT_PRFILET foreign key (PROFILETYPECODE) REFERENCES PROFILETYPE (PROFILETYPECODE); ALTER TABLE STATIONSERVICEHIST ADD CONSTRAINT FK_STNSERH_UZCODE foreign key (UFEZONECODE) REFERENCES UFEZONE (UFEZONECODE); ALTER TABLE RESOURCENODAL ADD ( CONSTRAINT PK_RESRCNDL PRIMARY KEY (UIDRESOURCE)); ALTER TABLE STARTTYPE ADD ( CONSTRAINT PK_STARTTYP PRIMARY KEY (STARTTYPE)); ALTER TABLE UOM ADD ( CONSTRAINT PK_UOM PRIMARY KEY (UOMCODE)); ALTER TABLE SETLPOINTTYPE ADD ( CONSTRAINT PK_STLPTTYP PRIMARY KEY (UIDSETLPOINTTYPE)); ALTER TABLE SETLPOINTHISTORY ADD ( CONSTRAINT PK_SPNTHIST PRIMARY KEY (UIDSETLPOINT, STARTTIME)); ALTER TABLE PROXYDAY ADD CONSTRAINT PK_PROXYDAY primary key (SETTLEMENTTYPE, SETTLEMENTTIME, WEATHERCODE, WEATHERZONE, PROXYDAY, PROXYDAYTYPE); ALTER TABLE METHOD ADD CONSTRAINT PK_METHOD primary key (METHOD); ALTER TABLE SETLPOINTHISTORY ADD ( CONSTRAINT FK_SPNTHIST_CMZONE FOREIGN KEY (CMZONECODE) REFERENCES CMZONE (CMZONECODE)); ALTER TABLE SETLPOINTHISTORY ADD ( CONSTRAINT FK_SPNTHIST_SETLPNT FOREIGN KEY (UIDSETLPOINT) REFERENCES SETTLEMENTPOINT (UIDSETLPOINT) ON DELETE CASCADE); ALTER TABLE SETLPOINTHISTORY ADD ( CONSTRAINT FK_SPNTHIST_STLPTTYP FOREIGN KEY (UIDSETLPOINTTYPE) REFERENCES SETLPOINTTYPE (UIDSETLPOINTTYPE)); ALTER TABLE CCCONFIGURATION ADD ( CONSTRAINT PK_CCCNFG PRIMARY KEY (UIDCONFIGURATION)); ALTER TABLE CCCONFIGURATION ADD ( CONSTRAINT FK_GEN_GENCD FOREIGN KEY (GENCODE) REFERENCES GENERATOR (GENCODE)); ALTER TABLE FLOWGATECALC ADD ( CONSTRAINT PK_FLOWGTCL PRIMARY KEY (UIDFLOWGATECALC)); ALTER TABLE FLOWGATE ADD ( CONSTRAINT FK_FLOWGATE_FLOWGTCL FOREIGN KEY (UIDFLOWGATECALC) REFERENCES FLOWGATECALC (UIDFLOWGATECALC));