~km wrote:
Hi together,
I'm a python-proficient newbie and want to tackle a program with
Python 2.x, which basically organizes all my digital books (*.pdf,
*.chm, etc..) and to give them specific "labels", such as:
"Author" -> string
"Read" -> boolean
"Last Opened:" -> string
and so on..
Now my question is:
Is it a better method to use a /database/, a /static File/, with some
Markup (e.g.: YAML, XML), a Python dictionary or are there better ways
In high-volume systems, it is almost always better to use a database.
Database solves many issues with concurrent access and persistent memory.
Though many would disagree, I consider XML as a form of database though
it is only suitable for data exchange. XML is suitable for low- to
medium-volume purpose and when compatibility with various systems is
extremely important (nearly any OS and any programming language has XML
parsers; porting a DBMS system may not be as easy as that).
Python dictionary is stored in memory and closing the program ==
deleting the database. You can pickle dictionary; and this might be
sufficient for quick and dirty, low-volume purpose. Pickled dictionary
is the least portable solution; only python program can open a pickled
dictionary and even different versions of python may have incompatibilities.
I
don't know of.., for organizing my books collection? I'm sure you can
do
it in any way above, but I'm apelling to /your/ personal experience
and
preference. Please give me at least one reason, why.
For a personal book collection where the number of books is around ~300
books and you don't care about porting to another system, pickled
dictionary may be just good enough.
--
http://mail.python.org/mailman/listinfo/python-list