I'm developing a JSF application, where I have all the objects sorted out (using good old inheritance and association) .
Obviously, I plan to save this data somewhere. First thing came to mind is stored as objects into a relational database. But I fear that might cause a problem since I plan to use indexing later (such Apache Solr), so I fear just storing data as objects might might hinder indexing.
Would it be a good idea to store the data as a flat file? Or is there another technology I need to look for? I guess my question is, what options to I have ?
JSF would make a good match for JPA. As for options, you can do something like divide your data into flat text 'bulk' vs things that make sense for relational. Then you could use the relational to store "handles" (locators of some kind) for fetching back the flat files. Later, when you want SOLR queries, you can just index them where the files are. That's one option.
Another: Oracle used to have its own implementation for textual indexing. MySQL--I do not know.
And finally: if you think you will ditch all relational at some point, place all access behind a DAO, to be reimplemented as you see fit.