1
It may be something simple for most, but I would like to know how to implement in practice a n-to-n relationship between Mysql tables using Delphi.
I created the diagram of my BD in Mysql Workbench, created DB, all right. My question is: the tables created automatically when an n to n relationship is made I need to create a routine to save the data in this table when registering new records, or is it possible to do this automatically?
Complementing the post:
The system I’m running is for satisfaction research. I’ll have the tables: Client: Customer data searched: Research: Registration of research. Questions_search: table n:n joining the survey with the questions that are part of the survey Questions: Questions from all surveys Questions_options _answer: table n:n that joins the answer options of the question (they are all multiple-choice answers for each question) Options: All response options Answers: Table of the survey itself, which joins the question, the answer option Customer Reply: Connect the customer with the answers given.
For the registration of questions and answers, I think calm because I have to register first the questions and answers, to then connect the two in table n:n, the same in the register of response options. My question is really due to the table Answers_client, because when I register a new answer, I will already have to register in this table. I was wondering if you have anything automatic to save this related data.
In Delphi I will use the standard components for access to Databases, or even Zeos Access. Below the diagram.
Perhaps as I do not know very well this part of DB modeling, it may be that there is a simpler way to create this system, maintaining the flexibility of creating new searches, questions and response options.
Take a look at these links, maybe you can find something that can help. http://www.devmedia.com.br/master-detail-simples-e-descomplicado-para-iniciantes-delphi/20370 http://www.devmedia.com.br/quick-tips-mestre-detalhe-em-delphi/15676
– Vanderson de Almeida
Hey, got your problem solved?
– Caputo