Problems with Openstreetmap data structure

Hi all,
My name is haiphong and I’m new to this community.
I am currently working on my thesis, but I’m having some difficulties figuring out how the osm file is structured.
I downloaded the osm file for Belgium, and then I converted it to a postgis database using osm2pgsql.
I am supposed to build a routing application, so I should be able to select locations by coordinates, or by inserting a street name of location name.
What I don’t understand though, is how the data is structured in relation to each other.
The data is divided in 4 tables, Point, Road, Line, Polygon.
Now I figure that Point just symbolizes a POI with coordinates.
On the other hand, I don’t understand what the difference is between the Road table and the Line table, nor what the Polygon table really symbolizes.
And how are the tables linked? I just can’t seem to figure how I can find out which Points belong to which Road/Line/Polygon. (In other words, which column defines the foreign key?)
All in all, I have to say, is that I’m really confused by this.
Tnx in advance!

is this wiki article of any help ? http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema

Then I assume that you are first of all familiar with all basic inforlations about raw OSM data accirding to http://wiki.openstreetmap.org/wiki/Elements and similar pages in the OSM wiki.

Yuor question is aiming at the special data structure when importing raw OSM data in a postgis database.
Then I can only hint you to http://wiki.openstreetmap.org/wiki/Databases_and_data_access_APIs

If you cannot get a good answer here, try the OSM dveloper mailing list, or maybe ask at http://gis.stackexchange.com

Correct.

Road contains secondary roads and higher, railways, and administrative borders. It’s mainly used for performance reasons for highzoom rendering.

They contain areas, such as landuse (forests, meadows) and highway areas.

They are not linked. The vertices of an area or the points of a way are not necessarily stored in planet_osm_point (to be precise, they are only stored in planet_osm_point if a vertex of the area or point of the way has tags on its own).

If you want the points or a line, you can just query the way column in planet_osm_line.

For a simple router, looking only at planet_osm_line should probably give you everything you need.