Index of /~raj/elna-lab-2010/ch4/company

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]company.tar 2018-05-17 10:23 30K 
[   ]employee.dat 2018-05-17 10:23 4.0K 
[   ]worksOn.dat 2018-05-17 10:23 1.1K 
[   ]dependent.dat 2018-05-17 10:23 504  
[   ]employee.sql 2018-05-17 10:23 408  
[   ]project.dat 2018-05-17 10:23 385  
[   ]source.sql 2018-05-17 10:23 274  
[   ]dependent.sql 2018-05-17 10:23 264  
[   ]project.sql 2018-05-17 10:23 261  
[   ]department.dat 2018-05-17 10:23 247  
[   ]worksOn.sql 2018-05-17 10:23 231  
[   ]department.sql 2018-05-17 10:23 210  
[   ]dept_locations.sql 2018-05-17 10:23 200  
[   ]dloc.dat 2018-05-17 10:23 192  
[   ]load-dloc.sql 2018-05-17 10:23 106  
[   ]load-dependent.sql 2018-05-17 10:23 106  
[   ]load-department.sql 2018-05-17 10:23 106  
[   ]load-employee.sql 2018-05-17 10:23 104  
[   ]load-worksOn.sql 2018-05-17 10:23 102  
[   ]load-project.sql 2018-05-17 10:23 102  

There are three files for each table in this directory. For example for the DEPARTMENT table the three files are:
  1. department.sql: contains the SQL Create Table statement to create the table.
  2. department.dat: contains data for the table to be loaded using the MySQL load command.
  3. load-department.sql: contains the LOAD command to load data into the table.

The file, source.sql, contains MySQL "source" commands to execute the "create table" and "load" commands for each table.

After signing in to MySQL and changing to "company" database, simply run the following command to create and populate the tables:

mysql> source source.sql