Completed SQLite Script