On Wednesday, January 11, 2012 11:44:48 PM UTC-5, Likit wrote: > > I guess I like SQL better than frameworks. SQL is a query language for > DDL and DML that is well documented and completely explicitly. > Frameworks are opaque and invent a new syntax subject to ambiguities > of parens, square braces, curly braces, dotted names, sometimes > tablenames being implicit, sometimes fieldnames being implicit. Why? >
SQL is not exactly the same across all RDBMS's, so it's useful to have an abstraction that can be used across different databases. web2py's DAL is actually probably closer to SQL (at least conceptually) than many frameworks, which typically provide an ORM (object relational mapper). In any case, you are free to use SQL if you wish. > So, I have repeatedly tried to make a link table like the famous dogs > and owners tables in the Web2py book to no avail. > > Each time there is a problem I must do the following: > - drop the database from mysql > - stop apache > - stop mysql > - delete the web2py application via the filesystem > - restore the web2py application via the filesystem making sure that > the cache and session files have been deleted > - restart apache > - restart mysql > - create the empty database in mysql > - run the web2py application > If you need to do all those things any time you have a problem, you're doing something wrong. In particular, I see no reason why you would need to delete the entire app from the filesystem (maybe the contents of the /databases folder in some cases). > Judging from the references below it is because of a faulty > migration. it's not like the most trivial migrations EVER work. What types of trivial migrations are failing for you? What exactly are you doing? > So, perhaps the real question is how does one purge every possible > vestige of both the tables and application so that web2py does not try > any of its so-called magic (which is supposed to be very unpythonic, > in any case). > What do you mean by "magic" and "unpythonic"? If you don't want migrations, turn them off: DAL(..., migrate_enabled=False) > I've wasted nearly 60 hours on web2py and am about to stop wasting any > more time. There seem to be many reasons that php, jquery, and RonR > have dusted python for web development. > Keep in mind that many frameworks don't provide database migrations at all. If that's what you prefer, you can turn off migrations in web2py. I don't think you'll find life any easier in RoR or PHP (unless you're already familiar with them, in which case, maybe stick with what you know). jQuery has nothing to do with server side development, so isn't relevant here. Anthony