-- 動物マスタ
create table mst_animals(
    id int AUTO_INCREMENT not null primary key
    , bit_pos INT not null
    , name VARCHAR(50) not null
);


insert into mst_animals (id,bit_pos,name) values (1,1,'犬');
insert into mst_animals (id,bit_pos,name) values (2,2,'猫');
insert into mst_animals (id,bit_pos,name) values (3,4,'ウミガメ');
insert into mst_animals (id,bit_pos,name) values (4,8,'キリン');
insert into mst_animals (id,bit_pos,name) values (5,16,'鳥');
insert into mst_animals (id,bit_pos,name) values (6,32,'ヤギ');
insert into mst_animals (id,bit_pos,name) values (7,64,'馬');

select * from mst_animals;


-- 飼い主
create table owners(
    id int AUTO_INCREMENT not null primary key
    , name VARCHAR(50) not null
    , pets INT not null
);

insert into owners (id,name,pets) values (1,'綾瀬',7);
insert into owners (id,name,pets) values (2,'金町',4);
insert into owners (id,name,pets) values (3,'藤代',31);
insert into owners (id,name,pets) values (4,'石岡',124);
insert into owners (id,name,pets) values (5,'勝田',41);
insert into owners (id,name,pets) values (6,'小木津',14);
insert into owners (id,name,pets) values (7,'植田',32);

select * from owners;
