Search code examples
data-access-layerweb2py

is there a list of naming conventions for web2py's DAL?


Clearly, the implicit naming conventions for DAL/web2py are different from the conventions adopted by Rose::DB::Object but i dont see any explicit list of such conventions anywhere.

Is there a set of principles that guide the name of tables and columns when modeling data with DAL?


Solution

  • There are no requirements imposed, so feel free to follow whatever conventions you like. I think many of the conventions you point to are typically followed in web2py code, though there seems to be more of a preference for singular table names, and foreign key column names are often just the foreign table name, without joining "_id" to the end. By default, all tables get an auto-incrementing id field named "id", though you can change that name if you like.