drop table if exists scores;
set names utf8;
create table scores (
given_name varchar(30) not null,
family_name varchar(30) not null,
score int not null,
primary key property (given_name, family_name, score)
) default charset utf8;
show create table scores;
Table	Create Table
scores	CREATE TABLE `scores` (
  `given_name` varchar(30) NOT NULL,
  `family_name` varchar(30) NOT NULL,
  `score` int(11) NOT NULL,
  PRIMARY KEY (`given_name`,`family_name`,`score`)
) ENGINE=mroonga DEFAULT CHARSET=utf8
insert into scores values("Taro", "Yamada", 29);
insert into scores values("Taro", "Yamada", -12);
insert into scores values("Jiro", "Yamada", 27);
insert into scores values("Taro", "Yamada", 10);
select * from scores;
given_name	family_name	score
Jiro	Yamada	27
Taro	Yamada	-12
Taro	Yamada	10
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada";
given_name	family_name	score
Taro	Yamada	-12
Taro	Yamada	10
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada" and score = 29;
given_name	family_name	score
Taro	Yamada	29
select * from scores where given_name = "Taro" and family_name = "Yamada" and (score >= -12 and score < 29);
given_name	family_name	score
Taro	Yamada	-12
Taro	Yamada	10
drop table scores;
