dispersy icon indicating copy to clipboard operation
dispersy copied to clipboard

Example community with an object-relational mapper

Open NielsZeilemaker opened this issue 11 years ago • 9 comments

Outcome: a tutorial with one or all three ORM packages used Goal: use higher-level relational algebra, instead of hand-coded SQL Motivation: less code, easy to expand and re-use

Options Sqlalchemy, Storm, Django:

  • http://www.sqlalchemy.org/
  • https://storm.canonical.com/
  • https://www.djangoproject.com/

One of many discussions on this: http://stackoverflow.com/questions/53428/what-are-some-good-python-orm-solutions

FYI: originally created by Johan in the Tribler project Tribler/tribler#130

NielsZeilemaker avatar May 30 '13 14:05 NielsZeilemaker

Last time I talked with Johan about this it seemed like we didn't want to put time into ORM anymore. If this is still the case I suggest we close this issue. Johan?

boudewijn-tribler avatar Jul 11 '13 10:07 boudewijn-tribler

Let's see if we can get an orm to work in Dispersy. Looking at this sqlobject, it seems pretty trivial: http://code.saghul.net/index.php/tag/sqlobject/

NielsZeilemaker avatar Jun 03 '15 08:06 NielsZeilemaker

@NielsZeilemaker I have a branch on Tribler that changes some database to use an ORM called Axiom. I converted all tables expect the Channel-related ones to use Axiom and it worked. So this would also be an option.

LipuFei avatar Jun 03 '15 08:06 LipuFei

Could you give me a pointer to this branch?

NielsZeilemaker avatar Jun 03 '15 08:06 NielsZeilemaker

https://github.com/LipuFei/tribler/tree/refactory_axiom_db

LipuFei avatar Jun 03 '15 09:06 LipuFei

Axiom seems to be something else, its an object store. I'd rather use an ORM if possible, and SQLObject seems a bit more mature.

NielsZeilemaker avatar Jun 03 '15 09:06 NielsZeilemaker

@NielsZeilemaker it can be used as an ORM just fine: https://github.com/twisted/axiom/blob/master/README.txt Also, sqlobject doesn't seem to have a working schema upgrade system...

whirm avatar Jun 18 '15 11:06 whirm

If we're not using it as an object database, but as orm then ok. But let's start with Dispersy, it's smaller.

NielsZeilemaker avatar Jun 18 '15 12:06 NielsZeilemaker

Yeah, that's what we where talking about with @LipuFei right now.

whirm avatar Jun 18 '15 12:06 whirm