Am Fr 24 Feb 2012 13:56:47 CET schrieb Rita:
I was wondering if its better to have a single table or multiple tables for
something I am doing. I have close to 3 millions rows in a single table and
here is how it looks:
t,user,price
1330087935,vberry,180.00
1330087935,mson,10.7
1330087935,hpack,780.08
1330087935,parj,80.02
1330088033,vberry,173.00
1330088033,mson,12.7
1330088033,hpack,783.08
1330088033,parj,80.02
I was wondering if there is a better way to normalize this data. And also,
I will be doing queries like, what is the most recent price for the
user,mson, and what is the average price for mson in the last 3 days, etc...
create a separate user table
i.e.
CREATE TABLE user(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL);
and use id (and not the name) in tables as a foreign key
greetings
oliver
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users