|
Hello. I am developing a small project in C#, in which I show chosen passages from a book.
Now I am not sure how do I store these passages in database? Currently I am considering these two options
1 - Storing passages as pictures in folders BUT their paths in the database. My application will get these paths and load the content in the window.
2 - Storing the actual text content in the database and load it in the window.
Can you please help me decide which way is better? Or is there any better way to do it? Thanks
This world is going to explode due to international politics, SOON.
|
|
|
|
|
Probably 2 but it could be 1.
Some examples for 1.
- text from illuminated book
- ancient text whose translation is in doubt
- legal documents where originals matter
|
|
|
|
|
Storing an image will give you the least amount of useful data, storing the text allows it to be searchable.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
AmbiguousName wrote: Can you please help me decide which way is better?
There is no "better" way; each has it's own advantages and disadvantages, and you'd need to check your requirements which suits better.
On a folder;
- You can have clashes in naming. Filenames must be unique.
- You have the advantage of the virusscanner picking things up. Most scanners don't do databases.
- You track an external asset
In a database;
- Easy with backups/restores; are you gonna backup that folder?
- Centralized; no need to document outside-repositories
- As easy to (hyper)link to as a document on a webserver. However, not being a file, the server cannot response to a header-request on it's freshness.
|
|
|
|
|
Plz try this...
http://stackoverflow.com/questions/5095533/storing-a-book-using-sql-server
|
|
|
|