return ans console get_bool("remove { }?format(title)"no"if anscursor db cursor(cursor execute("delete from dvds where id=?"(identity,)db commit(this function is called when the user asks to delete recordand it is very similar to the equivalent function in the dvds-dbm py program we have now completed our review of the dvds-sql py program and seen how to create database tablesselect recordsiterate over the selected recordsand insertupdateand delete records using the execute(method we can execute any arbitrary sql statement that the underlying database supports sqlite offers much more functionality than we needed hereincluding an auto-commit mode (and other kinds of transaction control)and the ability to create functions that can be executed inside sql queries it is also possible to provide factory function to control what is returned for each fetched record ( dictionary or custom type instead of sequence of fieldsadditionallyit is possible to create in-memory sqlite databases by passing ":memory:as the filename summary ||back in we saw several different ways of saving and loading data from diskand in this we have seen how to interact with data types that hold their data on disk rather than in memory for dbm files the shelve module is very convenient since it stores string-object items if we want complete control we can of course use any of the underlying dbms directly one nice feature of the shelve module and of the dbms generally is that they use the dictionary apimaking it easy to retrieveaddeditand remove itemsand to convert programs that use dictionaries to use dbms instead one small inconvenience of dbms is that for relational data we must use separate dbm file for each key-value tablewhereas sqlite stores all the data in single file for sql databasessqlite is useful for prototypingand in many cases in its own rightand it has the advantage of being supplied with python as standard we have seen how to obtain database object using the connect(function and how to execute sql queries (such as create tableselectinsertupdateand deleteusing the database cursor' execute(method python offers complete range of choices for disk-based and in-memory data storagefrom binary filestext filesxml filesand picklesto dbms and sql