wonder Expert Licensed User Longtime User Jan 31, 2015 #1 Hey guys, I have a few questions about lists. 1. What the maximum number of items (int values) a list can support. 2. To sort a big big big list, what's the best method/algorithm? Bubble sort? Quick sort? 3. Is it feasible to import 8 megabytes of data to a list and sort it? 4. Am I asking silly questions and should I just learn how to "database", mySQL and such? Last edited: Jan 31, 2015
Hey guys, I have a few questions about lists. 1. What the maximum number of items (int values) a list can support. 2. To sort a big big big list, what's the best method/algorithm? Bubble sort? Quick sort? 3. Is it feasible to import 8 megabytes of data to a list and sort it? 4. Am I asking silly questions and should I just learn how to "database", mySQL and such?
S susu Well-Known Member Licensed User Longtime User Jan 31, 2015 #2 With 8MB of data, I think SQLite is the best. You can sort it with only one query SELECT ... ORDER BY.. Upvote 0
With 8MB of data, I think SQLite is the best. You can sort it with only one query SELECT ... ORDER BY..
KMatle Expert Licensed User Longtime User Jan 31, 2015 #3 As the table you store the data in is a file, this should be no problem. What kind of data is it Upvote 0
wonder Expert Licensed User Longtime User Jan 31, 2015 #4 It could be, for example CSV values. Username, Score, Endurance Time. Code: user000001, 12, 8329 user000002, 17, 12329 user000003, 8, 3593 ... user999998, 5, 589 user999999, 12, 10384 Sort by highest score. Endurance time as a tie-breaker. If the score is the same, the highest ranked user is the one with the highest endurance time. Anyway, I'm starting to realize I really have to take the "database-on-a-server" path. My initial idea was to have my game downloading the entire scoreboard, updating it, sorting it, displaying it and re-uploading it using lists. This could be fine for a few dozen users, but if I ever reach thousands, I guess this system would break. Upvote 0
It could be, for example CSV values. Username, Score, Endurance Time. Code: user000001, 12, 8329 user000002, 17, 12329 user000003, 8, 3593 ... user999998, 5, 589 user999999, 12, 10384 Sort by highest score. Endurance time as a tie-breaker. If the score is the same, the highest ranked user is the one with the highest endurance time. Anyway, I'm starting to realize I really have to take the "database-on-a-server" path. My initial idea was to have my game downloading the entire scoreboard, updating it, sorting it, displaying it and re-uploading it using lists. This could be fine for a few dozen users, but if I ever reach thousands, I guess this system would break.
I inakigarm Well-Known Member Licensed User Longtime User Jan 31, 2015 #5 Db estructure permits great flexibility: Sorting By highscore and endurance time is very quick and easy with SQL (sqlite or MySQL) Upvote 0
Db estructure permits great flexibility: Sorting By highscore and endurance time is very quick and easy with SQL (sqlite or MySQL)
RandomCoder Well-Known Member Licensed User Longtime User Jan 31, 2015 #6 While we're on this subject, what is the preferred database? I recently installed MySQL, but only yesterday I read this post MySQL Library about licensing when using a JDBC driver. Does this rule out using MySQL in any Apps we intend to sell? I've not looked properly into it yet but would appreciate a simple answer. Upvote 0
While we're on this subject, what is the preferred database? I recently installed MySQL, but only yesterday I read this post MySQL Library about licensing when using a JDBC driver. Does this rule out using MySQL in any Apps we intend to sell? I've not looked properly into it yet but would appreciate a simple answer.