I am looking for a book or other undeniably authoritative source that gives reasons when you should choose a database vs. when you should choose other storage methods, most notably, a hardcoded table of values in a program.
The rest of this message is just supporting info.
Below are some unofficial lists of reasons to use one or the other, that I have gleaned from other stack overflow questions, other internet sources, my own experience, etc. But none that are as authoratative as a book. For those wondering, I'm trying to strengthen a case I have against a certain implementation that works fine for a mainframe platform in our company, but we share their code, and their use of a database for searching a table (which could easily fit in a program's literal storage and quickly be binarysearched) that is causing us hundreds of hours of extra setup and troubleshooting effort on the Windows platform. (It's a big system, to distributed users, and this pattern appears many times within it).
WHY USE A DATABASE?
if you need...
- Random Read / Transparent search optimization <=this is the only 'database benefit' this system uses
- Advanced / varied / customizable Searching and sorting capabilities
- Transaction/rollback
- Locks, semaphores
- Concurrency control / Shared users
- Security
- 1-many/m-m is easier
- Easy modification
- Scalability
- Load Balancing
- Random updates / inserts / deletes
- Advanced query
- Administrative control of design, etc.
- SQL / learning curve
- Debugging / Logging
- Centralized / Live Backup capabilities
- Cached queries / dvlp & cache execution plans
- Interleaved update/read
- Referential integrity, avoid redundant/missing/corrupt/out-of-sync data
- Reporting (from on olap or oltp db) / turnkey generation tools
[Disadvantages:] - Important to get right the first time - professional design - but only b/c it's meant to last
- s/w & h/w cost
- Usu. over a network, speed issue (best vs. best design vs. local=even then a separate process req's marshalling/netwk layers/inter-p comm)
- indicies and query processing can stand in the way of simple processing (vs. flatfile)
WHY USE FLATFILE:
If you only need...
- Sequential Row processing only
- Limited usage append only (no reading, no master key/update)
- Only Update the record you're reading (fixed length recs only)
- Too big to fit into memory
- If Local disk / read-ahead network connection
- Portability / small system
- Email / cut & Paste / store as document by novice - simple format
- Low design learning curve but high cost later
WHY USE IN-MEMORY/TABLE
(tables, arrays, etc.):
Pretty much all of these apply to our project's usage of the data
if you need...
- Processing a single db/ff record that was imported
- Known size of data
- Static data if hardcoding the table
- Narrow, unchanging use (e.g., one program or proc)
- includes a class that will be shared, but encapsulates its data manipulation
- Extreme speed needed / high transaction frequency
- Random access - but search is dependent on implementation
I'm not looking for other suggestions on how to make this work, e.g., SOA, WCF, this-or-that database; a table hardcoded into the program is a clear slam-dunk solution. Unfortunately none of the decision makers on this matter in my organization are in a position to see that. I'm just looking for good, authoratative documentation so I don't have to spend days and days writing up the reasons, documenting support calls, etc.
Although I am also kind of looking for items for these lists that I might have missed ;-)