开发者

creating and working with a large 2 dimensional dataset in android

ok i have an sql database (we'll call it DATABASE1) that receives inputs of names from the user and they can input as many as they want.. what i need to do now is hard code a datab开发者_StackOverflow社区ase or spreadsheet or matrix or something (we will call it DATASET1) that DATABASE1 can work with.. however the thing is is that DATASET1 is comprised of names of groups and each group contains a group of people.. think of DATASET1 as something like this..

group 1 = "john" "jim "joe" "ryan" "luke"

group 2 = "jim" "bob" "tim"

group 3 = "blake" "john" "bill" "frank"

...

...

...

so as you can see each group is a different set of names and there is no defined number for how many names are in each group.. now what i need to accomplish is that DATASET1 needs to work with DATABASE1 (which by the way will end up being very large.. it will start at 200 groups but will only continue to get bigger with updates.. probably in the thousands) and check for subsets.. my program needs to browse DATASET1 and take each group and see if it is a subset of DATABASE1 in the fastest/most efficient way possible.. anyone have any ideas about an approach?


Create a realtional database in SQLite:

Tables:

groups (id, name)

id - prikary key
name - name of a group

group_names (id, group_id, name)

id - prikary key
group_id references groups.id; this column should also have an index
name - name like "jim", "blake"

Is name order relevant?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜