Re: [sqlalchemy] schema design feedback

2012-07-02 Thread espresso maker
Ah thanks a lot! I totally missed table partitioning. I love the idea. On Sunday, July 1, 2012 3:49:55 AM UTC-7, Wolfgang wrote: Having a single table to store all the customer's logs didn't seem to work because when the device is removed and the logs have to be deleted the table gets

Re: [sqlalchemy] schema design feedback

2012-07-02 Thread espresso maker
I like the time based partitioning idea. I am going to explore it more. I usually try to stay away from triggers. They are hard to manage, and debug. You understood my intent straight away. :) Thanks! On Sunday, July 1, 2012 6:30:03 AM UTC-7, Vlad K. wrote: I see two approaches here.

[sqlalchemy] How do I do this SQL query in SQLAlchemy?

2012-07-02 Thread Jason Phillips
I have a MySQL database with the following structure and was hoping someone could help me convert the SQL query below to SQLAlchemy. *Database structure:* *bottom:* id name middle_id *middle:* id name top_id *top:* id name *Here are my