[FRPythoneers] Boulder Sprint: Adding Oracle support to Django

Eric Dobbs eric at dobbse.net
Tue Nov 7 16:07:04 MST 2006

Thanks for the summary Jim.

Here's an outline of what I think my talk would cover at PyCon if it  
get's accepted.  Have I missed anything important?  If it does get  
accepted can I arrange time with everyone so I can better understand  
the parts you worked on?  No rush.  Not even sure if the talk will  
get accepted.  I'd like to be able to answer at least a few questions  
about all of the specific problems.

Take care.


General sprint related technical challenges:

Getting connected to the network -- wireless wasn't working on the  
oracle box
Getting the source code, verifying the tests
Getting connected to the oracle database -- account creation,  
password dance
Installing database drivers
Getting database connection strings right
Problem specific technical challenges:

Oracle database table creation: not a one-liner like in PostgreSQL &  
autoincrement column types don't exist -- presently faking it with a  
30 character limit for table names: many_to_many_person_organization  
won't work in oracle
Pagination: Oracle doesn't have the convenient OFFSET and LIMIT clauses.
TextFields -- Oracle uses CLOBs for these which can be complicated
Gnarly oracle-specific queries for introspection
General thoughts on the outcome:

We got the test suite running (though failing) by the end of the day.  
SUCCESS. Key success factor: we had a django expert, several oracle  
experts, and everyone was comfortable with python. Jacob could point  
us to the right place in the source tree for a particular feature.  
Mitch and Jim could give us the correct SQL for oracle.
What could have made it even better:

assign homework before the sprint - ask for a branch ahead of time -  
ask participants to checkout the branch and run the tests (e.g. see  
how the tests run against SQLite) - ask participants to try  
installing oracle drivers ahead of time Might be hard to make all of  
those happen, but the more people who can get the homework done, then  
the more time for attacking the problem
Ensuring long term success of oracle support in django:

Mock object tests for the database code. The lead django developers  
have PostgreSQL and not Oracle. If we make mock objects for the  
database, then they can continue to test any future refactorings or  
changes against the SQL oracle expects even without the database.

More information about the FRPythoneers mailing list