CREATE TABLE SOS.CANDIDATES 
   (
   CANDIDATE_ID VARCHAR2(8) NOT NULL, 
   CANDIDATE_NAME VARCHAR2(44) NOT NULL, 
   OFFICE_ID VARCHAR2(4) NOT NULL, 
   OFFICE_TITLE VARCHAR2(54) NOT NULL, 
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PARTY_ID VARCHAR2(2) NOT NULL, 
   PARTY_ABBREVIATION VARCHAR2(3) NOT NULL
   );

CREATE TABLE SOS.COUNTIES 
   (
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   COUNTY_NAME VARCHAR2(17) NOT NULL, 
   NUMBER_OF_PRECINCTS NUMBER(3) NOT NULL
   );

CREATE TABLE SOS.MCDS 
   (
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   COUNTY_NAME VARCHAR2(17) NOT NULL, 
   MCD_ID VARCHAR2(5) NOT NULL, 
   MCD_NAME VARCHAR2(47) NOT NULL
   );

CREATE TABLE SOS.PARTIES 
   (
   PARTY_ABBREVIATION VARCHAR2(3) NOT NULL, 
   PARTY_NAME VARCHAR2(26) NOT NULL, 
   PARTY_ID VARCHAR2(2) NOT NULL
   );
 
CREATE TABLE SOS.PRECINCTS 
   (
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PRECINCT_ID VARCHAR2(4) NOT NULL, 
   PRECINCT_NAME VARCHAR2(36) NOT NULL, 
   CONGRESSIONAL_DISTRICT VARCHAR2(2) NOT NULL, 
   LEGISLATIVE_DISTRICT VARCHAR2(3) NOT NULL, 
   COUNTY_COMMISSIONER_DISTRICT VARCHAR2(2) NOT NULL, 
   JUDICIAL_DISTRICT VARCHAR2(2) NOT NULL, 
   SOIL_AND_WATER_DISTRICT VARCHAR2(4), 
   MCD_CODE VARCHAR2(5) NOT NULL
   );

CREATE TABLE SOS.STATE_HOUSE_RESULTS 
   (
   STATE VARCHAR2(2) NOT NULL, 
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PRECINCT_NUMBER VARCHAR2(4) NOT NULL, 
   OFFICE_ID VARCHAR2(4) NOT NULL, 
   OFFICE_NAME VARCHAR2(33) NOT NULL, 
   DISTRICT VARCHAR2(3) NOT NULL, 
   CANDIDATE_ID VARCHAR2(4) NOT NULL, 
   CANDIDATE_NAME VARCHAR2(36) NOT NULL, 
   PARTY_ID VARCHAR2(3) NOT NULL, 
   PRECINCTS_REPORTING NUMBER(3) NOT NULL, 
   PRECINCTS_IN_COUNTY NUMBER(3) NOT NULL, 
   VOTES NUMBER(4) NOT NULL, 
   PERCENTAGE FLOAT NOT NULL, 
   TOTAL_VOTES NUMBER(4) NOT NULL
   );

CREATE TABLE SOS.US_HOUSE_RESULTS 
   (
   STATE VARCHAR2(2) NOT NULL, 
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PRECINCT_NUMBER VARCHAR2(4) NOT NULL, 
   OFFICE_ID VARCHAR2(4) NOT NULL, 
   OFFICE_NAME VARCHAR2(29) NOT NULL, 
   DISTRICT VARCHAR2(2) NOT NULL, 
   CANDIDATE_ID VARCHAR2(4) NOT NULL, 
   CANDIDATE_NAME VARCHAR2(23) NOT NULL, 
   PARTY_ID VARCHAR2(3) NOT NULL, 
   PRECINCTS_REPORTING NUMBER(3) NOT NULL, 
   PRECINCTS_IN_COUNTY NUMBER(3) NOT NULL, 
   VOTES NUMBER(4) NOT NULL, 
   PERCENTAGE FLOAT NOT NULL, 
   TOTAL_VOTES NUMBER(4) NOT NULL
   );

CREATE TABLE SOS.US_PRESIDENT_RESULTS 
   (
   STATE VARCHAR2(2) NOT NULL, 
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PRECINCT_NUMBER VARCHAR2(4) NOT NULL, 
   OFFICE_ID VARCHAR2(4) NOT NULL, 
   OFFICE_NAME VARCHAR2(29) NOT NULL, 
   DISTRICT VARCHAR2(1), 
   CANDIDATE_ID VARCHAR2(4) NOT NULL, 
   CANDIDATE_NAME VARCHAR2(44) NOT NULL, 
   PARTY_ID VARCHAR2(3) NOT NULL, 
   PRECINCTS_REPORTING NUMBER(3) NOT NULL, 
   PRECINCTS_IN_COUNTY NUMBER(3) NOT NULL, 
   VOTES NUMBER(4) NOT NULL, 
   PERCENTAGE FLOAT NOT NULL, 
   TOTAL_VOTES NUMBER(4) NOT NULL
   );

CREATE TABLE SOS.US_SENATE_RESULTS 
   (
   STATE VARCHAR2(2) NOT NULL, 
   COUNTY_ID VARCHAR2(2) NOT NULL, 
   PRECINCT_NUMBER VARCHAR2(4) NOT NULL, 
   OFFICE_ID VARCHAR2(4) NOT NULL, 
   OFFICE_NAME VARCHAR2(10) NOT NULL, 
   DISTRICT VARCHAR2(1), 
   CANDIDATE_ID VARCHAR2(4) NOT NULL, 
   CANDIDATE_NAME VARCHAR2(21) NOT NULL, 
   PARTY_ID VARCHAR2(3) NOT NULL, 
   PRECINCTS_REPORTING NUMBER(3) NOT NULL, 
   PRECINCTS_IN_COUNTY NUMBER(3) NOT NULL, 
   VOTES NUMBER(4) NOT NULL, 
   PERCENTAGE FLOAT NOT NULL, 
   TOTAL_VOTES NUMBER(4) NOT NULL
   );
