SQLite_gem solution and JS solutions