I'm working on a research oriented task at work which is generating a lot of structured data. The sort of analysis we want to do screams RDBMS, so I've been doing my best to stuff everything into one. I have a very firm grasp of set theory and a fuzzy understanding of what SQL can do. I bought a book and am learning. Unfortunately, I have nobody at work to discuss this with.
I don't think a persistence framework is the right way to go. As I said, the normalized data is very structured and easy to model. But our "business objects" aren't very well defined. Depending on the particular algorithm we want to run, we may need to query the data in a different format... again, we're still in the research stage. Instead, I intend to create "data access" types as the needs arise and also focus on visualization. There's also not a lot of need for a CRUD-type operation. So I've been coding SQL directly, as a learning exercise and because I believe (maybe mistakenly) that those frameworks solve a different problem than I have.
I'm working in Java with JDBC and H2. Postgres installer kept bombing on me and embedded is easy since I'm the only one coding right now. I'm trying to get insight in two areas: how to manage the "SQL mixed in code" problem and JDBC best practices.
So the first one is more of an architecture question. How do you handle databases (even in other languages)? SQL in code? Lots of stored procedures? Persistence framework? SQL in text files? I'm just not sure what to do.
In the second question, I'm looking for the idioms as well as beginner problems to avoid in JDBC. For instance, I didn't know that ResultSet even had a close() method.
This is getting long... I'll add more questions as I think of them. Thanks!
I don't think a persistence framework is the right way to go. As I said, the normalized data is very structured and easy to model. But our "business objects" aren't very well defined. Depending on the particular algorithm we want to run, we may need to query the data in a different format... again, we're still in the research stage. Instead, I intend to create "data access" types as the needs arise and also focus on visualization. There's also not a lot of need for a CRUD-type operation. So I've been coding SQL directly, as a learning exercise and because I believe (maybe mistakenly) that those frameworks solve a different problem than I have.
I'm working in Java with JDBC and H2. Postgres installer kept bombing on me and embedded is easy since I'm the only one coding right now. I'm trying to get insight in two areas: how to manage the "SQL mixed in code" problem and JDBC best practices.
So the first one is more of an architecture question. How do you handle databases (even in other languages)? SQL in code? Lots of stored procedures? Persistence framework? SQL in text files? I'm just not sure what to do.
In the second question, I'm looking for the idioms as well as beginner problems to avoid in JDBC. For instance, I didn't know that ResultSet even had a close() method.
This is getting long... I'll add more questions as I think of them. Thanks!