~= dldos-db-mysql =~ *Overview* The dldos-db-mysql scripts can be used to import the DLDOS (Data Loss Database Open Source) 'dataloss.csv' file from attrition.org into a MySQL database. The scripts will create the necessary MySQL tables, import from the CSV file and load the data into a 'dataloss' table. The 'dataloss' table columns have referential integrity checks that constrain the data to appropriate values and types. Because of this, there are several data records that need to be "fixed" to meet the integrity constraints. These scripts are distribution under revised BSD license (see LICENSE). *Quick Install* - install MySQL - create a database to store DLDOS (e.g., "create database dataloss") - create a user for database (e.g., "create user 'dataloss'@'technicalattack.netfirmsmysql.com'") - grant rights (e.g., "grant all on dataloss.* to 'dataloss'@'technicalattack.netfirmsmysql.com'") - retrieve DLDOS database: wget -O dataloss.csv 'http://attrition.org/dataloss/dataloss.csv' - run rebuild script: ./rebuild "dataloss" "dataloss.csv" "dataloss" - if any records fail, new constant data may be needed; run: ./find-fail "dataloss" "dataloss" *Contents* - const-data.sql : insert constant data - create.sql : create the database tables - dldos-import : script to take dataloss.csv and import into tables - drop.sql : drop the database tables - find-fail : search for data that can't be imported - iso-country-codes.sql : insert list of ISO country codes - LICENSE : file describing license - README : this file - rebuild : wrapper script to drop, re-create and import data. *Known Issues* - need to use a MySQL user that doesn't require a password - lack of documentation