How to store/model reachable data in django.

31 views
Skip to first unread message

Subodh Nijsure

unread,
Jun 25, 2014, 10:45:50 AM6/25/14
to django...@googlegroups.com

Hello

I have need to store data that can be graphed. Example I have mobile app that collects temperature every 30 seconds for say 5 min and uploads these samples via REST api to my database. I happen to be using django for visualization.

Question I am pondering is what is the best way to store these values in database. Store each point as record in db or store csv file? Downside if trying to upload single point means lots of request to web site to upload data. Csv file means I can't graph across data collected over say one month.

Any tips on how to manage graphable data within django?

Subodh

Mario Gudelj

unread,
Jun 25, 2014, 9:29:27 PM6/25/14
to django...@googlegroups.com

You don't want to use a csv. Store them in a db table cell. Even if you have a million entries you'll be surprised how quick it will be.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALr9Q3Z%3D9CJvuG0vvbBPBoX_RXHJYCnuRifQN4OKautOG6ruvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tom Evans

unread,
Jun 27, 2014, 6:52:15 AM6/27/14
to django...@googlegroups.com
On Thu, Jun 26, 2014 at 2:28 AM, Mario Gudelj <mario....@gmail.com> wrote:
> You don't want to use a csv. Store them in a db table cell. Even if you have
> a million entries you'll be surprised how quick it will be.

Another option is RRD (Round Robin Database), which is designed for
collecting (and dropping) samples in order to always be able to
produce a set of graphs. The eponymous tool in this category is
rrdtool, which has python bindings.

Cheers

Tom
Reply all
Reply to author
Forward
0 new messages