Error connecting between BD tables

Asked

Viewed 75 times

0

inserir a descrição da imagem aquiEsquema

I’m trying to link the lesson table to the fouls. I am using the table "Licao_faltas" to make the connection, but it is not letting me connect the "faltas_Id" of the "licao" to the "licao_faltas"

Help Please.

  • Add the schema of the tables. Not knowing how they are, it becomes complicated to help.

  • Added :)..

  • I don’t quite understand your model, but there’s a way that you can connect with this modeling. Change your template by changing the primary Missing key only to Missing. Then you turn on Faults in Lica_faults by Falta_exp and then Lica_faults with Licao. It should work.

1 answer

1


Simple, you are trying to make the association of a simple key with a composite key.

And both sides of the relationship should contain the same fields, remove the composite key from the table(Lyco_faltas) do the relationship and apply the key again, this should work.

  • Da. But I in the table -Licao_faltas- if only put the primary key Faltas_id I can’t have a single record. And if I put "Falta_esp" to first, then I can’t make the connection between -licao- and -licao_faltas-.

  • Leave table without any key then apply composite key

  • Can scripting your base into a.sql and send me?

  • Actually, I’ve got it. I’ll tell you what to do?

  • Put it on an http://pastebin.com/ and send the link

  • Already solved. After all it was not necessary the intermediate table of "Lesson". Thanks anyway.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.