Home

15-Mar-2013
Version 2 - Database Scripts

Picture of an old crank - Just turn the crank.To speed up your development time and provide an example database, the NEMSIS team has developed several scripts that create functional EMS and Demographic databases. Each different script is designed for a specific type of database and will create the tables, columns, primary and foreign keys required to support the XSD and data dictionary.

Script Usage

These scripts are free to use and will save the user many hours in the setup of a basic database for EMS data and Demographic data. To allow for flexibility, no indexes or constraints have been added to any of the scripts beyond the basic primary/foreign key constraints.

Supported Databases

The supported databases are SQL Server, SQL Server Express Edition, Oracle, and Access.

*MySQL will not be supported anymore. For details please visit the FAQ's.

 

Download Instructions:

Windows: Simply right click on the links below and choose "save target as..." from the drop down menu.

Mac: Simply "control-click" on the links below and choose "download link to disk" from the drop down menu.

 

EMS Database Script Files

The EMS Database scripts are designed to be executed from within a database management tool such as MS Query Analyzer or TOAD. The script will first create a database called "NEMSIS," and then it will add the tables required to support the EMS XSD.

Once all of the tables have been added, the script adds in the Primary keys for each table and then establishes the foreign key relationships between the different tables. The database structure has been tested against the XSD’s and was used to import sample data.

 

Demographic Database Scripts

The DEMOGRAPHIC Database scripts are designed to be executed from within a database management tool, such as MS Query Analyzer or TOAD. The script will first create a database called “DEMOGRAPHIC,” and then it will add the tables required to support the DEMOGRAPHIC XSD.

Once all of the tables have been added, the script adds in the Primary keys for each table and then establishes the foreign key relationships between the different tables. To maintain the validity of data, the “DEMOGRAPHIC” database is more stringent than its corresponding XSD’s. Users of the “DEMOGRAPHIC” scripts should keep this in mind while using the database structure created by the scripts.

 

NEMSIS Lookup Table Script

The NEMSIS LOOKUP TABLE script is only designed for MS SQL SERVER. The script is in standard ANSI SQL and should run on the other platforms with minor modifications. This script will create a table under the “NEMSIS” database for the Look-up values and then insert all of the values contained in the data dictionary