auto_import takes the database folder with all the stored files. You can 
then avoid to do "define_tables", because the definitions are on the files 
"auto_imported". This means that you create a db, define_table for every 
table in one app, and access the same data without re-defining all tables 
with auto_import.

If you are going to access some random db in some path and want to access 
the data through the DAL, you have to istantiate a connection and define 
the tables you want to access if they are not yet defined by some other app.

If you don't want to create the tables or do changes in the schema, you can 
do:

define_table('example',
      Field('name'),
.....
migrate=False
)

If you're going to access many tables and don't want to repeat 
"migrate=False" all over the definitions, you can istantiate a connection 
with

db = DAL('uri', migrate_enabled=False)

In this way, table definitions allow you to access the data through the 
DAL, but the DAL won't attempt to create/migrate the existing table.

PS: let's say you have in a table 20 columns but you need to access only 10 
of them, you can define a table with 10 columns and access that data 
without any problems. Just be sure that for every Field you define exists a 
column with the corresponding type defined.

Reply via email to