Which ORM to use for Python and MySql? -


so have database stores lot of information many different objects; simplify it, imagine database stores information weights of 100 dogs , 100 cats on period of few years. made gui, , want 1 of tabs allow user enter newly taken weight or change past weight of pet if wrong.

i created gui using qt designer. before, communicated database using sqlalchemy. however, pyqt4 offers qtsql, think orm? explain me how orm works, , difference between sqlalchemy, qtsql, , sql connector?

qt sql sql framework comes qt library. provides basic (and classic) classes access database, execute queries , fetch results.*qt can recompiled support various dbms such mysql, postgres etc.

sql connector assume refer mysql connector ? if so, it's set of c++ classes access natively mysql database. classes same in qtsql. don't have support wrapper layer of qt. of course, cannot access database mysql.

sql alchemy it's hard briefly explain complexity of orm. object relation mapping. wikipedia says:

"a technique converting data between incompatible type systems in object-oriented programming languages"

it's definition. it's technique map table / queries data object-oriented data structure.

for example, orm engine hides process explicitly maps fields of table oo class. in addition, works same whatever database you're accessing (as long orm knows dbms dialect).

for such purpose, python language , philosophy fits orm. orm such sqlalchemy object-oriented database !

it has limitations though. if need make complex queries (and believe me, happens in specific contexts), becomes bit tricky use , might experience performance penalties.

if need need access single table hundreds records...it won't worth initialization process bit laborious.

z.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo