Importing spreadsheet data into MBARI_Samples database
This process is for importing data from spreadsheets into the MBARI Samples Database. It is used when there are a large number of specimens to be entered and the record-by-record forms in MS Access would be cumbersome. The first step (step I, below) is to create the spreadsheet in MS Excel, the second step is to import the data to the Access table template (table MSSQL_IMPORT), and the third step is to run the stored procedure called "migrate_ import" to distribute the data to the appropriate tables in the MS SQL Server database (text of stored procedure). Steps II and III must be performed on Windows 95 or NT.
The MSSQL_IMPORT table is found in the MS Access satellite database "sampleForms.mdb" under the Table tab. It is a template, a staging area for the data. Field names and formats of the template table must be carefully matched (spelling, data type, size) in the spreadsheet. Not all columns must appear in the spreadsheet. Those that do, however, need to be fully populated because the database defaults will not be applied. Note that the SeedConcept column names are not the same as the MS SQL Server database field names because they must be distributed to their own table. For each StartDTG, there must be a unique CollectionRefName and SampleRefName (all three are primary keys for the table).
| Validate FacilityName | |
| Validate MaterialName | |
| Validate Equipment | |
| Validate PreservativeMethod | |
| Validate ContainerType | |
| Validate SubSampleMethod | |
| Validate Citation | |
| Get the ChiefScientist ID From Person | |
| Get the Collector ID From Person | |
| Get the Contact ID From Person | |
| Create the CollectionGroup Records (Retain CollectionGroupID) based on unique StartDTG, ChiefScientistID, and ShipName | |
| Create the CollectionEvent Records (Retain CollectionEventID) based on unique CollectionEventDTG and CollectionRefName | |
| Create the Sample Records (Retain SampleID) based on unique SampleRefName | |
| Create the SeedVIMSConcepts Records | |
| Create the Storage Location Records | |
| Create the HazMat Records | |
| Delete Records from MSSQL_IMPORT which loaded successfully |
![]()
»Next: Temporary table design
Last updated: 28 April 2000 by Jennifer Paduan
Copyright © 1998 MBARI