I have an object place with some properties (name, longitude, latitude, etc) and one of the properties is an object "horizon".
Horizon had a Dictionary <float,float>
(set of points azimut-height in the horizon of the place)
I want to build a table to store the object "place", and I have troubles with the object "horizon"
Since I don't know how much points there are in the dictionary, I can't just build a column for each point.
So I think I have to create another table "dbo.horizons" with the columns
- placeName -varChar
- azimut - real
- height - real
and then use JOIN to select all the point
but I don't understand how to build the command
If I take a command like that:
SELECT places.name, places.longitude, places.latitude...,
horizon.azimut, horizon.height
FROM places LEFT JOIN dbo.horizons
ON places.name = dbo.horizons.namePlace
how I read it?
I use dataRedaer.Read()
to read a row in the database.
How I get all the points and build only one place?
And the same question in the insert, how I build an INSERT command to insert one place with horizon
Thanks