The Windows binary distribution works out of the box with SQLite, MSSQL, Postgresql and My SQL.
A partial list of supported databases is show in the table below.
Please check on the web2py web site and mailing list for more recent adapters.
Google No SQL is treated as a particular case in Chapter 13.
The Gotchas section at the end of this chapter has some more information about specific databases.
web2py comes with a Database Abstraction Layer (DAL), an API that maps Python objects into database objects such as queries, tables, and records.
The DAL dynamically generates the SQL in real time using the specified dialect for the database back end, so that you do not have to write SQL code or learn different SQL dialects (the term SQL is used generically), and the application will be portable among different types of databases.
For now, we will assume the presence of a single database since this is the most common situation. The connection string is the only web2py code that depends on a specific back-end database. In the case of My SQL, Postgre SQL, MSSQL, Fire Bird, Oracle, DB2, Ingres and Informix the database "test" must be created outside web2py.
Here are examples of connection strings for specific types of supported back-end databases (in all cases, we assume the database is running from localhost on its default port and is named "test"): Notice that in SQLite the database consists of a single file. Once the connection is established, web2py will create, alter, and drop tables appropriately. NDB uses a Memcache buffer to read data that is accessed often.
This is completely automatic and done at the datastore level, not at the web2py level.