Help needed on the use of tables

Discuss the database features
Post Reply
JOHNSON K G
Posts: 2
Joined: Tue Dec 19, 2017 1:28 pm

Help needed on the use of tables

Post by JOHNSON K G »

I am having a table with 3 columns. Just for representation purpose I have given names section, level and id.
If i want to make another table with section and level known, how can I get the corresponding id from the first table? Please help.
Attachments
help1.PNG
OpenOffice 4.1.1 on Windows 10
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Help needed on the use of tables

Post by UnklDonald418 »

Welcome to the Forum.
It isn't entirely clear what you are trying to accomplish because from that standpoint of relational database design what you have presented here doesn't make much sense.
TableA is acceptable, but TableB should not duplicate the data from TableA. TableB would contain other related data and should have its own automatically generated Primary Key. It could then have something like TblA_ID as an Integer field to store the Foreign key value from TableA so a relationship between the two tables can be established. Then using that relationship a query could be designed that would allow the user to see all the relevant fields from both tables.
Well designed database tables are not necessarily readable by the user, they only need to make sense to the relational database engine.
A good introductory tutorial for databases that can be downloaded from:
https://wiki.documentfoundation.org/ima ... torial.pdf
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
JOHNSON K G
Posts: 2
Joined: Tue Dec 19, 2017 1:28 pm

Re: Help needed on the use of tables

Post by JOHNSON K G »

Thank you for the reply.
OpenOffice 4.1.1 on Windows 10
Post Reply