Prev: Sharing: member type deduction for member pointers (Alf's device?)
Next: Python 3.1.2 and marshal
From: sturlamolden on 17 Jul 2010 09:25 On 17 Jul, 07:29, Nathan Rice <nathan.alexander.r...(a)gmail.com> wrote: > Lets push things to the edge now with a quick demo of many to many > relationship support. For this example were going to be using the > following XML: > > <Departments> > <Department> > <DeptNum>123</DeptNum> > <DeptName>Sales</DeptName> > <Employee> > <Number>143</Number> > <Name>Raul Lopez</Name> > </Employee> > <Employee> > <Number>687</Number> > <Name>John Smith</Name> > </Employee> > <Employee> > <Number>947</Number> > <Name>Ming Chu</Name> > </Employee> > </Department> > <Department> > <DeptNum>456</DeptNum> > <DeptName>Marketing</DeptName> > <Employee> > <Number>157</Number> > <Name>Jim Jones</Name> > </Employee> > <Employee> > <Number>687</Number> > <Name>John Smith</Name> > </Employee> > <Employee> > <Number>947</Number> > <Name>Ming Chu</Name> > </Employee> > </Department> > </Departments> Oh yes, I'd rather write pages of that rather than some SQL in a Python string.
From: Emile van Sebille on 17 Jul 2010 13:36 On 7/17/2010 6:25 AM sturlamolden said... > On 17 Jul, 07:29, Nathan Rice<nathan.alexander.r...(a)gmail.com> wrote: > >> Let�s push things to the edge now with a quick demo of many to many >> relationship support. For this example we�re going to be using the >> following XML: >> >> <Departments> >> <Department> >> <DeptNum>123</DeptNum> >> <DeptName>Sales</DeptName> >> <Employee> >> <Number>143</Number> >> <Name>Raul Lopez</Name> >> </Employee> >> <Employee> >> <Number>687</Number> >> <Name>John Smith</Name> >> </Employee> >> <Employee> >> <Number>947</Number> >> <Name>Ming Chu</Name> >> </Employee> >> </Department> >> <Department> >> <DeptNum>456</DeptNum> >> <DeptName>Marketing</DeptName> >> <Employee> >> <Number>157</Number> >> <Name>Jim Jones</Name> >> </Employee> >> <Employee> >> <Number>687</Number> >> <Name>John Smith</Name> >> </Employee> >> <Employee> >> <Number>947</Number> >> <Name>Ming Chu</Name> >> </Employee> >> </Department> >> </Departments> > > > Oh yes, I'd rather write pages of that rather than some SQL in a > Python string. > That's not the point. I've got examples of XML content that I don't create that could be tamed quite easily (if I understand from a quick once over). This looks really interesting. I've got to go read more now... Emile
From: Nathan Rice on 17 Jul 2010 14:20 > Oh yes, I'd rather write lines of that rather than pages of SQL in a Python string. (not to mention, avoid some easy to fall into security flaws, not have to worry about porting dialect specific SQL code, etc, etc). Fixed that for you. I can't take the credit for that part though, that magic comes from SQL Alchemy. All Struqtural does is let you move data into a database easily, move data from a database to Python easily, and simplify the creation of some common complex schemas.
|
Pages: 1 Prev: Sharing: member type deduction for member pointers (Alf's device?) Next: Python 3.1.2 and marshal |