Hello all
I am trying to make a database which consists of references for my research project. Entries to the database consist of either journal articles, book chapters, books or websites. Each entry will have fields such as Author, Year, Title, Source, Abstract, Comments. I have made a start on this but am not sure which of several options might be best.

The general issue is that different entries to the database will need some different fields. For example, a journal article will need the journal title, volume and pages. The book will need publisher and ISBN fields.

I have thought of a several implementations which look something like this:

Option A: make a single, catch all class which includes all possible fields. This will be a large class and depending on the type of reference, some of the fields will be unused. However, the database class itslef will be pretty simple - containing probably only a single STL container.

Option B: make several classes corresponding to each reference type. Then create a generic entry class, something like

Code:
class GenericEntry {
    eTYPE type;
    void * entry;
    //etc
};
... and use the 'type', to determine how to cast the void * (I am not 100% confident on this though). Finally the database itslef will, as before consist of a single STL container.

I was just pondering over the use of a union as an alternative, but I have not used a union ever, so this might be a dead end.

Option C: make several classes corresponding to each reference type. Also create the database class with STL containers for each of the different reference types.

Code:
class Database {
    std::vector <JournalEntry> journals;
    std::vector <BookEntry> books;
    //etc
};

I wonder what people think of this. I can't see ahead to the problems I will encounter, but that's part of the learning process. Just wondered which if any of the above options would be best, or if there are options I haven't thought of. Also, I'm just learning STL container classes and I guess that Vector might not be the best here - it's acting as a placeholder until I read a little more - always interested in suggestions though.

Thanks in advance