Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » lists in the django model system dealiomajigger. [RSS Feed]

#1 Nov. 25, 2005 06:38:10

p.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


What kind of field would one use to store a list of values (they're all
going to be strings, if that's relevant.)?

Offline

#2 Nov. 25, 2005 06:41:13

David A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


On 11/24/05,possibilitybox<> wrote:What kind of field would one use to store a list of values (they're allgoing to be strings, if that's relevant.)?Depends what you want to do with them.  Can you say more?--david

Offline

#3 Nov. 25, 2005 06:48:05

p.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


storing a list of tags, essentially, a la del.icio.us/flickr...

Offline

#4 Nov. 25, 2005 07:43:58

David A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


On 11/24/05,possibilitybox<> wrote:storing a list of tags, essentially, a ladel.icio.us/flickr...You should read up onhttps://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/AbstractTaggingCheers,--david

Offline

#5 Nov. 25, 2005 19:45:48

p.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


i quickly realized after this that i need lists for more than just
tags. i quite definitely need a list, or tuple, or some way to store
sequences in the backend, for multiple purposes.

i'm a bit baffled as to why there isn't a list type? is this
unfeasible in the sql backend?

Offline

#6 Nov. 25, 2005 19:52:07

A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


If you're properly normalising your data you should have anothertable for your tags and another still for the links between tags andother things, like blog posts.If you don't want to do that, just store them comma-separated in astring, and split on load.On 25 Nov 2005, at 19:45, possibilitybox wrote:i quickly realized after this that i need lists for more than just
tags. i quite definitely need a list, or tuple, or some way to store
sequences in the backend, for multiple purposes.________________________________
Afternoon, man about the Internet --http://aftnn.org/

Offline

#7 Nov. 26, 2005 00:09:46

p.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


what is this normalizing of one's data? never heard about it.

it seems that using sql as the backend means a radical departure from
regular python programming practice? i suppose that's what's confusing
me so much.

Offline

#8 Nov. 26, 2005 00:20:11

Tom T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


On 11/25/05, possibilitybox <> wrote:
>
> what is this normalizing of one's data? never heard about it.http://en.wikipedia.org/wiki/Database_normalizationIn short, it means defining any given piece of data in only one place.

Offline

#9 Nov. 26, 2005 00:26:31

A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

lists in the django model system dealiomajigger.


what is this normalizing of one's data? never heard about it.

it seems that using sql as the backend means a radical departure fromregular python programming practice? i suppose that's what'sconfusingme so much.:-)Database normalisation is a set of techniques for laying outdatabases. Read the wikipedia article for an explanation of why.As it applies to your goals, basically lists in DBs are bad becausethey don't really fit with SQL's model of storage and organisation.When you lay out your data in separate tables you get more efficientstorage, though you sometimes sacrifice performance. You have to usejoin statements to glue it all back together again.________________________________
Afternoon, man about the Internet --http://aftnn.org/

Offline

  • Root
  • » Django
  • » lists in the django model system dealiomajigger. [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support