such as postgresqlmysqland oracle are used almost identicallythe initial call to log in to the database will be all that normally requires different argument values for scripts that use standard sql code because of thiswe can use the sqlite system both as prototyping tool in applications development and as an easy way to get started with the python sql database api in this book as mentioned earlierthe third edition' coverage of mysql had to be replaced here because the interface used is not yet ported to python howeverthe third edition' mysql-based examples and overview are available in the book examples packagein directory :\pp \dbase \sql\mysql- xand its documentation subdirectory the examples are in python formbut their database-related code is largely version neutral since that code is also largely database neutralit is probably of limited value to most readersthe scripts listed in this book should work on other database packages like mysql with only trivial changes getting started regardless of which database system your scripts talk tothe basic sql interface in python is very simple in factit' hardly object-oriented at all--queries and other database commands are sent as strings of sql if you know sqlyou already have most of what you need to use relational databases in python that' good news if you fall into this categorybut adds prerequisite if you don' this isn' book on the sql languageso we'll defer to other resources for details on the commands we'll be running here ( 'reilly has suite of books on the topicin factthe databases we'll use are tinyand the commands we'll use are deliberately simple as sql goes--you'll want to extrapolate from what you see here to the more realistic tasks you face this section is just brief look at how to use the python language in conjunction with an sql database whether large or smallthoughthe python code needed to process your database turns out to be surprisingly straightforward to get startedthe first thing we need to do is open connection to the database and create table for storing recordsc:\pp \dbase\sqlpython import sqlite conn sqlite connect('dbase 'use full path for files elsewhere we start out by importing the python sqlite interface here--it' standard library module called sqlite to our scripts next we create connection objectpassing in the items our database requires at start-up time--herethe name of the local file where our databases will be stored this file is what you'll want to back up to save your database it will create the file if neededor open its current contentsqlite also accepts that special string ":memory:to create temporary database in memory instead sql database interfaces