Greetings all! I'm new to Cach� and am working on an Internet Bible project with Cach� (I'm planning on writing a web app in .NET) as my backend. I'm still getting my head around querying within the database, so let me run this scenario by you guys and hopefully you can help me make sense of things.
The way I structured my database was to have a bible class. The class contains a parameter for the version and then a collection of books (another object). The book object contains a name and a collection of chapters (object again). The chapter object contains a name (technically a number) and a collection of verses (object). The verse object contains the name (again a number technically) and the verse text. To recap, I have encapsulated a several objects within the structure that you would see if you were building this in a class. If I was doing this in "old relational database style" I'd simply have a verse table with a field for version, book, chapter, verse number, and text. So now to the querying part. In "old relational style", I'd normally do something like SELECT * FROM verses WHERE book = 'Genesis' AND chapter = '1' and I'd get a result set of verses and iterate through each record and render/store/whatever. If I'm understanding part of the power behind the object relational model, can I setup a query that says SELECT chapter FROM BibleVersion where BookName = 'Genesis' and Chapter = '1' and have an entire Chapter object returned to me? Then I can iterate through the verses within the object to do my rendering. Similarly could I query to return an entire book object, and then iterate through each chapter and verse as I see fit? If so, what does a query like this look like? Do I assign the query to a Cach� Object as part of my query? Or do I still use the relational query style and still iterating through a record set? Thanks in advance for any insight you may provide. If you have any particular examples on how to plug this in with .NET, feel free to send it my way and I will do the same as I start working with things. I love the potential I see with Cach�, especially since I want to expand the Bible to incorporate the emerging semantic web technology, which requires an object oriented database as is to store/process its information. - Sean
