我有以下的数据库模式:加入SQLite中的表有多对多
create table people (
id integer primary key autoincrement,
);
create table groups (
id integer primary key autoincrement,
);
,我已经有哪些人是在一个单独的文件,该文件组的成员(让我们在(person id
,group id
元组说)。我怎样才能构建我的数据库模式,以便访问一个人的组,并且也容易访问一个组的成员?阅读我目前拥有的元组是很困难和缓慢的,所以我希望这是以数据库的形式,我不能有像member1
,member2
等这样的列作为列,因为组中的人数目前是无限的。
请发布您尝试过的查询。 – Kermit 2013-05-14 18:11:24
文件组中的成员(.txt,.php,.csv等)还是他们的另一个表groups_people – csi 2013-05-14 18:13:14
@ChristopherIckes它们位于.txt文件中。 – jclancy 2013-05-14 18:15:06