Hi and welcome to OSM and the forum

Have you googled for “OSM data model”? → https://wiki.openstreetmap.org/wiki/Elements

I don’t know the structure of your PostgreSQL database but it should be similar to the OSM data-model. There should be tools to visualize the dependencies inside your PostgreSQL-Database.

In short:
The smallest entity in the data-model is a **node **which have the information of longitude and latitude.
The next higher entity is a **way **which is simply a list of nodes. If the first and the last node in the list are the same the way is called an area.
The highest entity is a relation, which is a collection of single nodes and / or ways which have something in common.

All these entities can have additional information (tags) to further describe the entity, e.g. adding highway=residential make a way to be a residential road, shop=bakery makes a node to a bakery aso.

PS: Could you please adjust the title of this thread to something like “What is the OSM data-model” by editing you 1st post? Currently the titel is you username. :wink: Thanks.