public StorageDatabase() {
		
		
		try {
			Class.forName("org.h2.Driver");
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		
		File root = Constants.getRoot();
		File databaseLocation = new File(root,"storageDatabase");
		String path = null;
		try {
			path = databaseLocation.getCanonicalPath();
		} catch (IOException e2) {
			// TODO Auto-generated catch block
			e2.printStackTrace();
			throw new RuntimeException(e2);
		}
		
		
		try {
			databaseConn = DriverManager.getConnection("jdbc:h2:" + path + ";ifexists=true","","");
		} catch (SQLException e) {
			// Database does not already exist
			try {
				databaseConn = DriverManager.getConnection("jdbc:h2:" + path,"","");
				initializeDatabase();
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			
			
			e.printStackTrace();
			
		
			
		}
		
		
		try {
			addFile = databaseConn.prepareStatement("INSERT INTO FileList VALUES ( ?, ? ,?, ?)");
			printAllFiles = databaseConn.prepareStatement("SELECT * FROM FileList");
			findFileWithTime = databaseConn.prepareStatement("SELECT * FROM FileList WHERE (? BETWEEN StartTime AND EndTime) OR (? BETWEEN StartTime AND EndTime) OR (StartTime BETWEEN ? AND ?) ");
			clearAll = databaseConn.prepareStatement("DELETE FROM FileList");
			updateEndTime = databaseConn.prepareStatement("UPDATE FileList SET EndTime = ?, Length = ? WHERE FileName =? ");
			getFileInfo = databaseConn.prepareStatement("SELECT * FROM FileList WHERE FileName = ?");
		} catch (SQLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
		
		
		
	}