How to create relationship tables 1: N?

0

I have already studied database and understand how the diagramming of this type of relationship works, but now that I am trying to implement this database using sqlite3 and python I have seen some problems. I have the following database

TheproblemisthatIhavetocreatenewtablesofEsp(U,IV,andVis)foreachoftherowsoftheMastertable.EachrowintheMastertablehasdatacorrespondingtoadayofreadingsofthreesensors.Thesesensorshaveadatareadingoftwocolumnswithdatacorrespondingtoagraph(Cartesianplanex,y).Therewouldbethreex,y(morethanathousandrows)pairsoftablesforeachrowofthemastertableIcanillustratetherelationshipasfollows Where the red highlighting will match the data that should be related.

So my difficulty is in creating the tables, because I can not create two tables with the same name, and then I would have to create the tables Esp with the nomenclature Esp_U1, Esp_U2, Esp_U3 ...? This does not seem right at all

Please tell me what to do about creation, it will be tables with very different nomenclatures. What would be the correct way to do the implementation of the relationship 1: M?

    
asked by anonymous 23.03.2017 / 18:22

2 answers

1

The issue has now been resolved. I've always had trouble understanding the concept, but TRUE, when creating a 1: N relationship I'm not creating many tables for a table, I'm just creating more rows in the existing table and numbering a field to tell which "instance" table given belongs. so I do not need to create more tables, the concept is simply adding the value in the same table, but referencing it as another one using more values in the foreign key.

Anything to forgive confusion

    
02.06.2017 / 18:33
0

Dude, if you need to create new tables for your data, it means that your DBMS architecture as a whole is wrong.

You have to review all the data and what you want to do with your application.

Tell me better what your problem is why depending on you need an auxiliary structure a join table. because in cases of M: M

What is this master table?

Does it gather data from the other tables?

If yes, wrong diagram perhaps a structure is missing. or maybe you did not understand a simpler thing the table you created manages all the data.

Tables are generally a means of storing information

That is, a fruit table can hold all fruits, not just greens.

    
23.03.2017 / 18:42