I have been working on this project in my spare time for a few weeks now, as I mentioned in a previous post , I have define a number of data classes and have decided to use an SQL Lite DB as a robust data store.
I built a simple data-class to handle the transactions to the DB.
The class consisted of a few methods that execute a pre-built sql command, 2 method in which to build the SQLLiteCommand object and some public methods to return a category and an image.
Handling Images
I wanted my application to store images in a separate table for performance reasons, a http handler could then be used to return an image. Since the images will upload as a byte stream , it is very easy to store them in the DB.
Going to make some changes
Last night I was thinking that wouldn't it be great if I could create multiple instances of each type on the client side. Say for example I wanted to create a ’list of books I hate’ the data is still of type books, but since my current DB schema only supports one category of a particular type this would be impossible.
How to Fix?
Again not too difficult I will have to move each type out of a single table and into its own, then I could store each instance in the table as a serialized JSON stream. I will need to create Collection class for each type, able to read the data from the DB and de-serialize into a collection.