AccessConversion

From GombeMIWiki
Revision as of 12:58, 7 March 2013 by KarlPinc (talk | contribs) (New page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Initially you will want to work in the gombemi_raw database to convert the data with minimal data integrity rules. Later you can work in gombemi_test to convert with data integrity rules in place and finally in gombemi to do the final conversion.

The general outline is as follows:

  • Import all the support (lookup) tables
  • Import the BIOGRAPHY_DATA table
  • Export the following tables from Access as csv files:
    • follow
    • follow_1_minute
    • follow_1_minute_infant
    • follow_1_minute_mother
    • follow_1_minute_sibling
    • follow_5_minute
    • follow_5_minute_group
  • Delete all rows from the following tables in the conversion schema (if necessary), in the following order:
    • follow_5_minute_group
    • follow_5_minute
    • follow_1_minute_sibling
    • follow_1_minute_mother
    • follow_1_minute_infant
    • follow_1_minute
    • follow_1_minute
  • Import the Access csv files into their corresponding tables in the conversion schema. Import in order of creation as listed above.
  • Prepare the Access data for conversion by running prepare_data() as follows:
    select prepare_data();
  • Use convert_access() to convert a desired time period, the dates are inclusive. Repeat as necessary with different time periods. If you get an error the database is unchanged.
    select convert_access('1990-01-01', '1990-12-31');
  • Fix errors in the data and repeat.