Hi, ALL,
CREATE TABLE players( playerid integer primary key, name );
CREATE TABLE league( leagueid integer primary key, name );
CREATE TABLE playersinleague( playerid integer, leagueid integer,
price double, foreign key playerid references players(playerid),
foreign key leagueid references league(leagueid) );
CREATE TABLE draftedplayers( playerid integer, leagueid integer,
draftprice double, foreign key playerid references players(playerid),
foreign key leagueid references league(leagueid) );

I have a pool of players which is assigned to a league by some
conditions. Different leagues might have different players.
Now from the playersinleague I am drafting players one by one.
In the end of my application I will store the drafted players into the
draftedplayers table.

When application starts I need to retrieve first all available players
and then all players that are drafted.

Probably the easiest way would be to query playersinleague for all
players and then query draftedplayers for all drafted players.
But is it efficient? Is it fastest?

I will probably need an index created on draftedplayers on the leagueid, right?

Thank you for any suggestions.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to