也许不是你想要的答案,但我想用SQL术语表达。您询问的部分:
Profile(section_id) [HAS] MoviesSection
Profile(section_id) [HAS] BooksSection
MoviesSection(profile_id) [BELONGS TO] Profile
BooksSection(profile_id) [BELONGS TO] Profile
在SQL中看起来像:
create table profile (
profile_id
);
create table moviessection (
section_id,
profile_id,
constraint fk1 foreign key (section_id) references profile (profile_id)
);
create table bookssection (
section_id,
profile_id,
constraint fk2 foreign key (section_id) references profile (profile_id)
);