given info above, the following seems reasonable:
// this table has your 12 chapters
create table chpt (
chpt_id tinyint(2) primary key auto_increment,
title varchar(50) not null,
-- url varchar(100) not null ?
)
/
1 intro
2 beginnings
3 ...
/
// this table associates chapters & sections
// section.chpt_id is foreign key to chpt.chpt_id
create table section (
chpt_id tinyint(2) not null,
sec_id tinyint(4) not null,
title varchar(50) not null,
-- url varchar(100) not null, ?
primary key (sec_id,chpt_id)
)
/
1 1 why another book about this?
1 2 intended audience
1 3 online resources
2 1 my philosophy
2 2 their philosophy
2 3 the choice is clear
3 1 ...
/
if you can adopt a simple naming convention for urls, then you won't need to store urls in url columns. e.g., chpt1.html, chpt2.html, &c; sec1.html, sec2.html, &c.
e.g., update section s set s.chpt_id=1, s.sec_id=4 where s.title='my philosophy'