You don't have to use the DAL, but as Massimo pointed out, SQLFORM uses it 
(I suppose you could still use SQLFORM.factory and manually handle 
inserts/updates). Note, you don't necessarily have to create DAL models for 
every table in your db -- you can model just a subset that would be most 
helpful (e.g., those used with forms). There's also this script 
(http://code.google.com/p/web2py/source/browse/scripts/extract_pgsql_models.py) 
for automatically creating DAL models from an existing Postgres database -- 
perhaps you could adapt it for SQLite.

Anthony

On Tuesday, January 24, 2012 4:54:13 PM UTC-5, Nomad wrote:
>
> Im looking for feedback on if this is poor practice
>
> situation: i have an existing service that uses a sqlite3 database i was 
> asked to port to a webapp. Being semi-familiar with MVCs and web2py i 
> decided to give this a go. We have functions defined in python to return 
> the expected data already.the app itself has 18+ months worth of data
>
> problem: reading up on the pdf manual (we written btw) it seems like using 
> a DAL i have to define every naunce of the current database. Also, there is 
> strong change of data type changing based on the description.
>
> Is it bad practice just to import sqlite3 and call it a day ? Is there any 
> strong advantage to using a DAL ? or am i simply over thinking the problem ?
>
> feed back would be appreciated
>

Reply via email to