Implementation to repair Metric Functional Dependencies
-
Set up Java
sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
-
Install postgresql
sudo apt-get install postgresql-9.3 postgresql-client libpq5 libpq-dev
-
Install JDBC for postgresql found here
-
Download the latest version of the driver (a jar file)
-
Move the jar file to the
lib/
folder within the project. -
Create a new project in eclipse.
File > New > Java Project
-
Set the location to the root location of the project. Click
Finish
-
Update the eclipse project's build properties to use include the binary on the build path
Project > Properties > Java Build Path > Libraries
-
Click 'Add External JARs...' and locate jar file within the lib folder (unless the jar is already there).
-
Click Okay once completed to close the dialog.
-
Enter the main database
sudo -u postgres psql postgres
-
Update the user's password (where
test123
is the new password):ALTER USER postgres with password 'test123';
-
Ensure postgresql is running:
sudo service postgresql restart
-
Create the database:
sudo -u postgres createdb movies
-
Update the path for the full project's path in the
doc/movies.sql
file. The line should looke like the following:\copy "movie"(website, name, name_2, duration) from '/path/to/project/doc/MoviesRuntime.txt';
-
Add the schema the schema into the database.
sudo -u postgres psql movies < doc/movies.sql
-
Create the database
sudo -u postgres createdb clean_flight
-
Load the schema
sudo -u postgres psql clean_flight < doc/clean_flight.sql
-
Install ruby2.2 you need only install ruby not rails.
-
Install ruby headers.
sudo apt-get install ruby-dev
-
Install ruby dependencies
sudo apt-get install libpq-dev bundle install
-
Mass load in the
clean_flight
dataset:bash import_all /path/to/directory/containing/clean_flight/
-
Alteratively, load in the values of a single file using the script.
ruby inserter.rb /path/to/clean_flight/db.txt > log.txt
-
Set the the database and delta you wish to use
-
Run the script
bash runner