On Tue, 26 Mar 2013 08:55:32 -0700 (PDT) "Edward K. Ream" <[email protected]> wrote:
> I know next to nothing about data bases, and have never used schemas. > Indeed, I've never used a db at all except to interface Leo nodes with the > zodb. > > I would appreciate your suggestions for learning resources that might bring > me somewhat up to speed for the sprint. Thanks! There are SQL and no SQL driven DBs. I don't know much about the latter, they seem to be important to massively distributed systems which need to keep multiple copies of the same data in multiple places. Traditional SQL DBs are all about tables/records/fields and relating / filtering them. They use indexes (binary trees etc.) to extract subsets of information very very fast, this is really the magic of decent RDBMSs, the way they cleverly decide which of several different strategies best suits the extraction of a particular subset of data. But that's all internal black box magic, not something non-DB-developers need to know about. To learn about SQL type DBs you probably need to stop thinking about Leo, because Leo's data schema is structurally very simple, it's power is in what it can express (anything representable by a tree), not the complexity of the tree itself, which is just 'each node has some children'. DB tutorials often give examples based on managing a small business (customers, addresses, invoices, receipts, products, inventory) and a tutorial that takes that approach and describes the SQL to create, populate, and extract from the relevant tables would probably give you an idea of what SQL DB's do. A blog is another common exmaple, tables are users, posts, threads, comments, etc. There are Object Relational Mappers (ORMs) to hide all the SQL stuff in objects in client language, but I think it's worth getting an intro to SQL, it is mostly simple and interesting. You can use SQLite interactively in its own terminal or from Python via PEP 249, http://docs.python.org/2/library/sqlite3.html Moving data in and out of a DB won't be hard*, it's the reconciling of changes from others that would be. I'm sure these issues have been addressed before, just not sure where to look - I did poke around in the Chandler code base once, can't remember if it was for their reconciliation code or something else. Point being that another domain which leads to a need for reconciling changes is mobile devices - appointments etc. added while off wifi have to be synced with servers when you're back on wifi, and maybe you changed something through the web in the mean time... (*) although I still haven't solved the "reading uA info. from 2.7 info. in 3.x if there're pickled datetimes in it" problem. http://pastebin.com/66D4AZpk works in 2 and not 3, anyway, way off topic. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
