Design - continued ......

Data storage

Storage of data is essential if the system is to remember any user specific data such as the user’s real name, e-mail address, which news groups that they are subscribed to and which articles within the group they have read.

The ‘newsrc’ is the most important piece of data that the system should store about a user. The reason being that a newsrc file, or in the case of this project just the data stored within, is a plain ASCII file that lists news groups, whether or not the user is subscribed to the specific news group and the article numbers that the user has read.

There are three obvious choices for data storage.

  • Flat file
  • XML database server
  • SQL database server

 

   

 

Flat file

A flat file stores data in a file which is managed by the application, rather than using a separate database server or external library. While the simplicity of using a flat file is appealing, there are also, unfortunately, several drawbacks related to using flat files for storing data in a multi-user system that out weigh any possible advantage of using such a simple system. These are detailed below.

  • Flat files do not scale very well.
  • Locking can cause problems in a multi-user environment.
  • Delimiting data with common characters requires character escaping within the data being stored.
  • ‘Re-invention of the wheel’ is an unnecessary extension to development time.
  • When used with a CGI application may introduce permission problems.
  • Implementing a query language is both necessary and time consuming.

XML Database Server

At present there are several implementations of XML database servers, which are used to store XML data or what is more commonly referred to as a native XML database. The two implementations that I looked at for consideration with this project were ‘eXist Open Source XML Database’ and ‘Apache Xindice’. Currently the common query language used in such systems is XQuery, “a query language that uses the structure of XML intelligently can express queries across all these kinds of data”.

 


 

  Web Based News Reader Home Page

   Previous    Next  
 

Produced by: UniversalTeacher.com