Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Storing Java Objects in Oracle
Hi everyone,
I am encountering the following problem: I have a programmed a subway route-optimization program, and I have decided to store the information about different citys' subway grids in an Oracle database. The problem is this: in my solution, inherently, stations and lines are 'recursive', in other words I have layed out my Java code in such a way that each station knows about its immediate neighbours, and each line knows about all the lines it intersects with. That leads to quite a problem: I can either store all the stations (and lines) twice, calling one table 'station', and the other 'neighbour', or sth. similar, and then give each neighbour a foreign key of which station it is a neighbour of. But I think's thats a horrible way of doing things (not to mention it needlessly doubles info, thus violating 3rd normal form...) so I think the way to go is to create all my stations, (including their 'adjacentStations' array list data member) in Java, connect to the DB, and then store those stations in the db. Any comments ?
Thanks for your advice,
Regards,
Volkmar Received on Mon Mar 25 2002 - 08:40:30 CST
![]() |
![]() |