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

[ICO]NameLast modifiedSizeDescription

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

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