On Jul 4, 2013, at 8:31 AM, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote:
> Donald Stufft <donald <at> stufft.io> writes: > >> I would prefer a single entry. It makes the serialization format map to the >> modeling simpler, and I think it's simpler for humans too. I don't see much >> benefit to making it a list except arbitrarily adding another level of >> nesting. > > It's a question of > > { > "install": ["a", "b", "c"] > } > > versus > > { > "install": "a" > }, > { > "install": "b" > }, > { > "install": "c" > } > > and I can't see why you think the latter is in any way better. IMO > implementation details (such as "it's easier for the Django ORM to map it") > should not take precedence over other considerations of > readability/simplicity. In any case, I can't see why there would be any > particular modelling problem with the scheme I've suggested. It's not that it's easier for the Django ORM to map it, it's just a simpler structure all together. It goes from a single relation to what's essentially a M2M with extra data on the intermediate table. I think it's better because there's less moving parts and this is designed for machines. Human readability is a nice to have but not hardly a requirement. Simpler, not impossible vs impossible ;) > > Is the modelling work you're doing public? I had a quick look at your > warehouse repo (github.com/dstufft/warehouse) and I don't see any models > beyond User and Email. Is that the correct location? I'd be happy to take a > closer look to get a better understanding of what modelling problem you're > seeing/foreseeing. And yea it's in that repo. Still in a branch though as I haven't finished it. > > FYI the metadata that I'm maintaining on red-dove.com is stored in a SQL > database. While my SQL schema is not yet fully aligned with the PEP (as it's > WIP), I don't see any modelling problem between an RDBMS backend and any of > the JSON formats which have been published in the various revisions of the > PEP. Some more detail would help :-) > > Regards, > > Vinay Sajip > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > http://mail.python.org/mailman/listinfo/distutils-sig ----------------- Donald Stufft PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig