Files
2012-02-21 01:15:00 -05:00

1 line
3.3 KiB
JSON

[{"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195505.260983, "message": "Suppose you have a sort of taxonomic tree structure with things like Animal, Cat, Dog, Bulldog, Poodle, Toy Poodle, etc... that is defined in a json, xml or whatever. Furthermore, suppose that it's actually a graph where nodes might appear in the tree in more than one place.", "group_id": 81, "id": 1286398}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195945.2932079, "message": "Specifically, I'm looking for something that integrates well as a django app and would make sense to a typical django developer.", "group_id": 81, "id": 1286425}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195718.8588259, "message": "How would you tackle this problem? Does anyone have any pointers to other projects that do something similar successfully?", "group_id": 81, "id": 1286417}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195616.731436, "message": "The tree is too large to write everything out by hand and has the potential to change in future versions.", "group_id": 81, "id": 1286404}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195570.2829709, "message": "Now, you want to create a python library to allow you to create instances of those types and then store the values of the attributes defined on them in a database or document store.", "group_id": 81, "id": 1286403}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307195659.1048059, "message": "so, I'm thinking of generating the code and/or using something where the \"type\" is more loosely defined.", "group_id": 81, "id": 1286412}, {"user_id": 27939, "stars": [], "topic_id": 38086, "date_created": 1307196499.865762, "message": "I haven't tackled this problem in a Django app, but I would seriously consider using a graphdb like neo4j if I were going to do this. I've seen a couple of articles on this, so it looks like some people are doing this : http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=neo4j+django", "group_id": 81, "id": 1286458}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307198156.039269, "message": "OK interesting idea. I had considered a document model since it is flexible but hadn't considered a graph db. I'll look into that more. Mostly the relationships are is_a type relationships so it's something that would normally be modeled as classes. The instances themselves have some relations themselves but it was something that could be handled by foreign keys and/or document references.", "group_id": 81, "id": 1286510}, {"user_id": 27939, "stars": [], "topic_id": 38086, "date_created": 1307199361.1130011, "message": "Ah, I somewhat misunderstood your problem.", "group_id": 81, "id": 1286550}, {"user_id": 6648, "stars": [], "topic_id": 38086, "date_created": 1307201463.8111651, "message": "I'm considering using postgres' new hstore and a set of generated \"Document\" objects similar to couchdbkit (http://couchdbkit.org/docs/django-extension.html) where one of the values is a 'type.'", "group_id": 81, "id": 1286686}, {"user_id": 1736, "stars": [{"date_created": 1307300685.2223711, "user_id": 33202}], "topic_id": 38086, "date_created": 1307215296.9646249, "message": "Look at https://github.com/django-mptt/django-mptt/", "group_id": 81, "id": 1288232}]