XML as a relational database?

B

Brent Ritchie

Hello,

My name is Brent Ritchie. I am starting a project for my family as a
christmas present. What I want to do is create a lightweight database of my
family tree, and allow family members to run a web service locally in thier
browser. Because of it being local I don't want them to have to install a
perl or PHP server or a database server on thier machines. So I looked to
XML, which I am very new to. What I want to know is it possible to structure
different XML files as tables in a relational database, store the
information in those files and then pull different pieces of information
from each file and display them? If so then are there any good tutorials or
refrences for producing that type of behaviour. I looked at w3schools.com
but they didn't mention anything like that. If not, what other options would
anyone suggest?

Thank you for your time.

Brent Ritchie
 
B

Bob Foster

Yes, you could put together a bunch of XML files that contain information
about your family tree. Then you could use XSLT or an experimental version
of XQuery, such as the one in Saxon 7, to extract information from the
files.

But, no, it wouldn't be relational and it wouldn't really be a database.
Just a bunch of files. E.g., you wouldn't have the ability to atomically
update individual "records" in the files, to extend the data definition in
while retaining your existing data, or any of the many other capabilities
that distinguish a database from a bunch of files.

Nor would you get any help running a server.

If you know what you're doing, setting up a local PHP server with MySQL
might be just fine. It will allow you to craft a user interface your family
might find appealing and you won't waste time trying to put together a
pretend-database.

Bob Foster
 
C

Christopher Browne

Brent Ritchie said:
My name is Brent Ritchie. I am starting a project for my family
as a christmas present. What I want to do is create a lightweight
database of my family tree, and allow family members to run a web
service locally in thier browser. Because of it being local I don't
want them to have to install a perl or PHP server or a database
server on thier machines. So I looked to XML, which I am very new
to. What I want to know is it possible to structure different XML
files as tables in a relational database, store the information in
those files and then pull different pieces of information from each
file and display them? If so then are there any good tutorials or
refrences for producing that type of behaviour. I looked at
w3schools.com but they didn't mention anything like that. If not,
what other options would anyone suggest?

The result of this will certainly NOT be more than vaguely similar to
a relational database. No relations, to be sure.

If you want a database, then you'll have to install one.

Firebird and PostgreSQL are decent relational databases that are
available for free. (MySQL AB will expect you to pay about $450/host
for their database unless your applications satisfy their licensing
requirement.)
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://cbbrowne.com/info/advocacy.html
"Absolutely nothing should be concluded from these figures except that
no conclusion can be drawn from them."
-- By Joseph L. Brothers, Linux/PowerPC Project
 
R

Rosimildo da Silva

Bob said:
Yes, you could put together a bunch of XML files that contain information
about your family tree. Then you could use XSLT or an experimental version
of XQuery, such as the one in Saxon 7, to extract information from the
files.

But, no, it wouldn't be relational and it wouldn't really be a database.
Just a bunch of files. E.g., you wouldn't have the ability to atomically
update individual "records" in the files, to extend the data definition in
while retaining your existing data, or any of the many other capabilities
that distinguish a database from a bunch of files.

Nor would you get any help running a server.

If you know what you're doing, setting up a local PHP server with MySQL
might be just fine. It will allow you to craft a user interface your family
might find appealing and you won't waste time trying to put together a
pretend-database.

But programs that works as "brokers" between relational DB and XML based
applicatons exist.

The company I work for has such a product in "beta" right now, and it is
calld XQX: XML --> SQL --> XML

For more information, please visit the XQX web page at:
http://www.connecttel.com/index.php?link=_XQX

A new version that uses annotated XML schema to define the XML
documents to be retrieved/updated, is to be released soon.

Rosimildo.
 
C

Christopher Browne

In the last exciting episode said:
But programs that works as "brokers" between relational DB and XML
based applicatons exist.

But the O.P. was imagining that by "simply using XML," he might
eliminate the need to have a relational database, with attendant
complexities.

Throwing in an XML-to-RDBMS "data broker" would mean that he'd have
not only the XML components, but also a DBMS _as well as_ a "broker"
application that is likely of comparable size and complexity.

Instead of diminishing the "size," he bloats size/complexity to
something like 3x worse than it would have been if he had used a
proper database in the first place.
--
"cbbrowne","@","ntlug.org"
http://www.ntlug.org/~cbbrowne/nonrdbms.html
``God decided to take the devil to court and settle their differences
once and for all. When Satan heard of this, he grinned and said, "And
just where do you think you're going to find a lawyer?"''
 
R

Rosimildo da Silva

Christopher said:
But the O.P. was imagining that by "simply using XML," he might
eliminate the need to have a relational database, with attendant
complexities.

Throwing in an XML-to-RDBMS "data broker" would mean that he'd have
not only the XML components, but also a DBMS _as well as_ a "broker"
application that is likely of comparable size and complexity.

Instead of diminishing the "size," he bloats size/complexity to
something like 3x worse than it would have been if he had used a
proper database in the first place.

I agree. For simple things, plain XML files maybe the way to go.

Rosimildo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top