[Haskell-cafe] Using Haskell as a database

Dmitri Pissarenko mailing-lists at dapissarenko.com
Mon Jan 10 10:11:57 EST 2005


Hello!

I am thinking about writing a system, using which it is possible to store
information about the structure of a bureaucratic system. 
  
Coarse-grained features of the program include: 
  
1) The program should allow the user to enter the hierarchy (like: authority X
has a board of Y members, each of them has Z departments under his/her control
etc) of a governmental organization 
  
2) The program should visualize the hierarchy in form of a tree 
  
3) It should be possible to enter information about what areas of public
administration a particular civil servant is responsible for. In other words:
If things go wrong in some domain, controlled by the government, the user
should be able to figure out, who is responsible for that mess. 
  
My first idea was to use a relational database for storing this information.

However, a relational database may be inefficient due to the complexity of the
data structure.

At the moment, I think that it makes more sense to store the data in form of
facts (not tables as in relational database).

I mean that one is able to enter statements like (this is PROLOG syntax)

isOrganization(X).
hasBoard(X, Members) :- isOrganization(X),
	isList(Members).
civilServant(X).
isResponsibleFor(X, Y) :- civilServant(X),
	domain(Y).

and then run queries, using which one can find out, which organizations are
there, what members they have etc.

Can one do this in Haskell?

Thanks in advance

Dmitri Pissarenko


More information about the Haskell-Cafe mailing list