ThenwhenIgeneratethelogicalmodelIgetthefollowingresult:
Threetablesplayer,times...andsponsor,andtheproblemisinthesponsortablethatreceivesastheforeignkeytheidoftheteam,Idonotwantthesponsortosponsorateam'n'andyesthe'teams+time1+time2..."all time then I do not know how to do because at the time of inserting in the physical model there is no single identifier that identifies all teams, just the id of each team: time1 id = 1 time2 id = 2 time3 id = 3 time4 id = 4
Physical model:
CREATE TABLE times+time1+time2+time3+time4 (
nome Text,
id int PRIMARY KEY,
f1 Text,
f2 Text,
f3 Text,
f4 Text
)
CREATE TABLE patrocinador (
nome Text,
valor Text,
cnpj int PRIMARY KEY,
id Text,
id Text,
FOREIGN KEY( id) REFERENCES times+ time1+time2+time3+time4 (id)
)
CREATE TABLE jogador (
cpf int PRIMARY KEY,
sobrenome Text,
nome Text,
lider Text,
time Text,
id int,
FOREIGN KEY( id) REFERENCES times+ time1+time2+time3+time4 (id)
)
If someone knows how to solve? Thanks in advance for your attention!