create table guild (
	id integer primary key,
	name text
);
create unique index idx_guild_name on guild(name);

create table player (
	id integer primary key,
	name text,
	guild integer references guild(id)
);
create unique index idx_player_name on player(name);

create table association (
	id integer primary key,
	lhs integer references player(id),
	rhs integer references player(id),
	note text
);

create table note (
	id integer primary key,
	content text,
	timestamp string,
	player integer references player(id)
);