In article <mailman.1959.1383429046.18130.python-l...@python.org>, Chris Angelico <ros...@gmail.com> wrote:
> On Sun, Nov 3, 2013 at 5:30 AM, Jussi Piitulainen > <jpiit...@ling.helsinki.fi> wrote: > > Suppose a database allowed structured values like lists of strings, > > lists of numbers, or even lists of such lists and more. Then it would > > actually be a Python issue how best to support that database. > > PostgreSQL supports some higher-level structures like arrays. > Personally, though, I think the most general representation of a > Python list in a database is either a varchar field with some form of > structure (eg the repr of a list), or a separate table with a foreign > key back to this one. When you say "database" here, you're really talking about relational databases. There are other kinds. In MongoDB, for example, storing a list of lists of strings is a perfectly reasonable and straight-forward thing to do. Anything which can be represented by bson (which is more or less the same as anything which can be represented by json) can be inserted directly. -- https://mail.python.org/mailman/listinfo/python-list