-- Last updated 20100602 Added truncate_table() stored procedure definition to create_tables.sql file for carsales database. -- Last updated 20100601 One hundred and ten (110) queries have been added to the sql.tar file - 55 running against brighthouse tables and 55 running against the MyISAM tables (if created, loaded and indexed). Descriptions of the queries can be found in the file query_descs.txt. -- Last updated 20100527 Added explicit CHARSET and COLLATE clauses to all DDL to ensure that CMAP Knowledge Nodes get created. -- Last updated 20090516 Create a directory in /tmp named carsales and 'cd' into it. # cd /tmp # mkdir carsales # cd carsales Copy the demo database tar.gz file to this directory. # cp /tmp/carsales Unpack all files. # tar xvf [date]_carsales_db.tar # tar xvf sql.tar # tar xvf data.tar Unzip the data files. # gunzip *.gz (If a different path, or paths, were used than above the LOAD script will need to be edited to reflect the correct path.) Ensure that all files have he correct permissions and ownership. If loading the MyISAM tables, the files must be owned by user 'mysql' and be readable. SQL scripts should be executable. If you have a standard Infobright instalation, you will have both a 'mysql' user and 'mysql' group. # chown mysql * # chgrp mysql * # chmod 666 * # chmod 755 *.sql Create a carsales database schema. # mysql-ib mysql> create database carsales; Select the new carsales database schema. mysql> use carsales Execute the DDL creation script. mysql> source create_tables.sql Warnings are normal the first time you run this. It contains DROP table statements. Run it again and confirm that there are no warnings or errors. Load the data. mysql> source load_carsales.sql NOTE: This loads the same data into identical Infobright and MyISAM tables for comparison purposes. It also loads a 10 million record fact table, a 9.3 million normalized version of the table and its companion 9.3 million record dimension table. This takes a litte time in Infobright and A LOT of time with the MyISAM tables. You can comment out loading the MyISAM tables if this is not of interest to you or you don't have the space for it. NOTE: The fact_sales_wide table (and _fact_sales_wide in MyISAM) is a denormalized version of the fact_sales table that includes a complete denormalization of the dim_vehicles and dim_dates tables. As there is a one-to-one relationship between the events in the fact_sales table and the vehicles in the dim_vehicles table, this is a reasonable design approach. As the dim_dates is very narrow, this also is a consideration one might make.