473,508 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Database

I'm creating a simple site that will display photos, which I'd like to
organize and display.

A full database would be WAY overkill for this site. I'm wondering if an XML
files could be used instead as a simple database. I know it wouldn't be as
efficient, but if I can open, read, search, modify and save the contents, it
seems like it would work pretty good for me.

Concurrency would be nice too, although I don't really think that's
necessary for this current site.

Thanks for any tips.

Jonathan

Jun 27 '08 #1
13 1026
On 9 Jun, 18:04, "Jonathan Wood" <jw...@softcircuits.comwrote:
I'm creating a simple site that will display photos, which I'd like to
organize and display.

A full database would be WAY overkill for this site. I'm wondering if an XML
files could be used instead as a simple database. I know it wouldn't be as
efficient, but if I can open, read, search, modify and save the contents, it
seems like it would work pretty good for me.

Concurrency would be nice too, although I don't really think that's
necessary for this current site.

Thanks for any tips.

Jonathan
XML data is fine. Just need to remember:

(1) There is no support for more than one user modifying the data at
any one time.

(2) Don't have the convenience of the SQL language for retrieving data
where joined tables are involved.

ASP.NET does have good support for typed datasets using XML and in
simple cases XmlDataSource for binding visual controls.

I find it useful to create DataSets in the App_Code directory. There
you can define primary keys with auto-increment and relations between
tables. Then create a class file named as being a DataObject and put
all your db handling in there. Use ObjectDataSources rather than
XmlDataSources because the latter object only reads attribute based
fields (unless you know how to write Xsl transforms). Typed datasets
are in node format.

A good case for XML is data that is largely static and read-ony to
ordinary users but with edting facilities for a site administrator.

Performance wise I don't see any problem unless the volume of data is
very large which would probably warrant SQL server anyway.

HTH
Jun 27 '08 #2
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:uf**************@TK2MSFTNGP06.phx.gbl...
Thanks for any tips.
In addition to Stan's comments, I'm a firm believer in using the correct
tool for the job. XML is not a database, and trying to make it pretend to be
one is always, IMO, the wrong solution.

You say "a full database would be WAY overkill for this site".. I'm not
really sure what you mean by a "full" database, but is there any real reason
that you can't use a bog-standard Jet database? Instantly, you have all of
the advantages of ADO.NET, plus all the concurrency you could want...

Even if the database contained only one table, it would still be much better
than using a text file...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #3
Mark,
In addition to Stan's comments, I'm a firm believer in using the correct
tool for the job.
Indeed.
You say "a full database would be WAY overkill for this site".. I'm not
really sure what you mean by a "full" database,
Microsoft SQL Server 2005, for example.
but is there any real reason that you can't use a bog-standard Jet
database? Instantly, you have all of the advantages of ADO.NET, plus all
the concurrency you could want...
Here's a couple of reasons off the top of my head: I don't know anything
about Jet database, probably don't have it, don't know how to use it, don't
want to spend a week learning it, and suspect it would also be overkill for
my needs.
Even if the database contained only one table, it would still be much
better than using a text file...
So then you appear to disagree with Stan's comments?

Thanks.

Jonathan

Jun 27 '08 #4
Stan,
XML data is fine. Just need to remember:

(1) There is no support for more than one user modifying the data at
any one time.

(2) Don't have the convenience of the SQL language for retrieving data
where joined tables are involved.

ASP.NET does have good support for typed datasets using XML and in
simple cases XmlDataSource for binding visual controls.
Cool. All I really want to do is organize the heirarchy of some images and,
rather than hard code them in the HTML files, thought it would be cool to
simply edit an XML file. Not only would this be quicker, but it gives me the
option of writing code to make it easy for my client to modify the data as
well.

I suppose it's possible that two people could attempt to modify the data at
the same time, but in the extremely unlikely event that happens, it would be
okay if it just overwrote whatever else had been done.

It could mean the difference between requiring my client to upgrade his
account to simply modifying the one he has.
A good case for XML is data that is largely static and read-ony to
ordinary users but with edting facilities for a site administrator.
That's me.

Thanks.

Jonathan

Jun 27 '08 #5
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:uy*************@TK2MSFTNGP05.phx.gbl...
>but is there any real reason that you can't use a bog-standard Jet
database? Instantly, you have all of the advantages of ADO.NET, plus all
the concurrency you could want...

Here's a couple of reasons off the top of my head: I don't know anything
about Jet database, probably don't have it, don't know how to use it,
don't want to spend a week learning it, and suspect it would also be
overkill for my needs.
A Jet database is a .mdb file which is the default database file format for
Microsoft Access, and is shipped with several other Microsoft products -
it's probably the most common file-based database format in the world:
http://en.wikipedia.org/wiki/Microso...atabase_Engine
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #6
I was actually aware that it was the Access database. I just wasn't sure (in
fact, I have no idea) what is available to use it from ASP.NET.

At any rate, it would be overkill for my needs.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uQ*************@TK2MSFTNGP02.phx.gbl...
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:uy*************@TK2MSFTNGP05.phx.gbl...
>>but is there any real reason that you can't use a bog-standard Jet
database? Instantly, you have all of the advantages of ADO.NET, plus all
the concurrency you could want...

Here's a couple of reasons off the top of my head: I don't know anything
about Jet database, probably don't have it, don't know how to use it,
don't want to spend a week learning it, and suspect it would also be
overkill for my needs.

A Jet database is a .mdb file which is the default database file format
for Microsoft Access, and is shipped with several other Microsoft
products - it's probably the most common file-based database format in the
world:
http://en.wikipedia.org/wiki/Microso...atabase_Engine
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Jun 27 '08 #7
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

[top-posting corrected]
>>>but is there any real reason that you can't use a bog-standard Jet
database? Instantly, you have all of the advantages of ADO.NET, plus
all the concurrency you could want...

Here's a couple of reasons off the top of my head: I don't know anything
about Jet database, probably don't have it, don't know how to use it,
don't want to spend a week learning it, and suspect it would also be
overkill for my needs.

A Jet database is a .mdb file which is the default database file format
for Microsoft Access, and is shipped with several other Microsoft
products - it's probably the most common file-based database format in
the world:
http://en.wikipedia.org/wiki/Microso...atabase_Engine

I was actually aware that it was the Access database.
No, it's the Jet database - there's no such thing as an Access database...
I just wasn't sure (in fact, I have no idea) what is available to use it
from ASP.NET.
I have no idea what that means...
At any rate, it would be overkill for my needs.
<rolls eyesOK...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #8
Mark,
>At any rate, it would be overkill for my needs.

<rolls eyesOK...
What the hell does that mean? I said from the start that a full database
would be WAY overkill. You question almost every term I use and push forward
with database recommendations. (And make dubious statements that there is no
such thing as an Access database.)

Everything is cool with the exchange unless you have an attitude about me
not needing a database. Then, I think you're up in the night.

Jonathan

Jun 27 '08 #9
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:eA****************@TK2MSFTNGP04.phx.gbl...
What the hell does that mean? I said from the start that a full database
would be WAY overkill. You question almost every term I use and push
forward with database recommendations.
You say you don't want to use a database, and instead would prefer to use an
XML file (which is *ENTIRELY* unsuited to database functions) and somehow
pretend that it's a database...

You clearly need the functionality of a database (you've said so yourself
when you mentioned concurrency - something totally impossible with an XML
file), but have somehow got it into your head that you'd like to achieve
that functionality without actually using a database...

That's fine, of course - you're perfectly entitled to say you want database
functionality without using a database...

But I'm just as entitled to suggest that the best way of achieving database
functionality is to actually use a database...
And make dubious statements that there is no such thing as an Access
database.
There is no such thing as an Access database - Access uses the Jet database
natively...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #10
Someone stating there is no such thing as an Access database is not a
dubious statement it is a fact. Access is only referred to as a database
because morons (like you are starting to sound like) do not understand the
difference between a GUI and the actual JET database engine. I suppose we
can thank the Micromoron Marketing fools but still, people just get
downright tired of explaining to lazy fools over and over again.

So regardless, you're really being unnecessarily argumentative Jonathan.
Developers have responded to your concerns now you should accept the advice
or go do your own thing. Either way you and only you manage the consequences
and IMO some very pertinent concerns have been brought to your attention.
Don't ya think?

<%= Clinton Gallagher



"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:eA****************@TK2MSFTNGP04.phx.gbl...
Mark,
>>At any rate, it would be overkill for my needs.

<rolls eyesOK...

What the hell does that mean? I said from the start that a full database
would be WAY overkill. You question almost every term I use and push
forward with database recommendations. (And make dubious statements that
there is no such thing as an Access database.)

Everything is cool with the exchange unless you have an attitude about me
not needing a database. Then, I think you're up in the night.

Jonathan
Jun 27 '08 #11
AFAIC, the only morons are those who think they understand my requirements
better than I do. And this nonsense about Access is simply a game of
semantics. Some people think it's more important to argue about semantics
than discuss the issue being raised, and then even start calling names when
everything they say is not blindly accepted.

Oh well, thanks to one reply, this thread has served a useful purpose to me.
I'm out of here.

Jonathan

"clintonG" <no****@nowhere.comwrote in message
news:O1**************@TK2MSFTNGP02.phx.gbl...
Someone stating there is no such thing as an Access database is not a
dubious statement it is a fact. Access is only referred to as a database
because morons (like you are starting to sound like) do not understand the
difference between a GUI and the actual JET database engine. I suppose we
can thank the Micromoron Marketing fools but still, people just get
downright tired of explaining to lazy fools over and over again.

So regardless, you're really being unnecessarily argumentative Jonathan.
Developers have responded to your concerns now you should accept the
advice or go do your own thing. Either way you and only you manage the
consequences and IMO some very pertinent concerns have been brought to
your attention. Don't ya think?

<%= Clinton Gallagher



"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:eA****************@TK2MSFTNGP04.phx.gbl...
>Mark,
>>>At any rate, it would be overkill for my needs.

<rolls eyesOK...

What the hell does that mean? I said from the start that a full database
would be WAY overkill. You question almost every term I use and push
forward with database recommendations. (And make dubious statements that
there is no such thing as an Access database.)

Everything is cool with the exchange unless you have an attitude about me
not needing a database. Then, I think you're up in the night.

Jonathan
Jun 27 '08 #12
On 10 Jun, 16:06, "clintonG" <nob...@nowhere.comwrote:
Someone stating there is no such thing as an Access database is not a
dubious statement it is a fact. Access is only referred to as a database
because morons (like you are starting to sound like) do not understand the
difference between a GUI and the actual JET database engine. I suppose we
can thank the Micromoron Marketing fools but still, people just get
downright tired of explaining to lazy fools over and over again.
It is reasonable to make the distinction between Microsoft Access as
an application and the underlying database that it connects to but we
shouldn't be too hard on those who tend to refer to the two entities
interchangeably.

Microsoft themselves do this. The data source component introduced in
Framework 2 that connects to a JET database is called an
AccessDataSource and the help documentation contains the following
words:

"Represents a Microsoft Access database to data-bound controls."

However it may become necessary to emphasise the distinction if this
misleads anyone into thinking that using an AccessDataSource requires
Microsoft Office to be installed or that a knowledge of MicroSoft
Access is required. In reality the only difference between using this
type of component and SqlDataSource is in the connection strings and
some of the SQL syntax (e.g. parameters can't be named in the SQL
command text, only "?" is allowed).

HTH
Jun 27 '08 #13
"Stan" <go********@philhall.netwrote in message
news:de**********************************@b1g2000h sg.googlegroups.com...
Microsoft themselves do this.
Yes they do - sometimes! And, unfortunately, that's the problem... There's
no consistency at all.

I've lost count of the number of support calls I've taken over the years
where people have pointed ASP / ASP.NET at a Jet database and then wondered
why none of their custom functions worked, or why they couldn't run any of
their reports...
However it may become necessary to emphasise the distinction if this
misleads anyone into thinking that using an AccessDataSource requires
Microsoft Office to be installed or that a knowledge of Microsoft
Access is required.
Also correct. I've had people contact me asking if they need to buy Office
licences, or where they should install Access...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3314
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
6
7303
by: Marvin Libson | last post by:
Hi All: I am running DB2 UDB V7.2 with FP11. Platform is Windows 2000. I have created a java UDF and trigger. When I update my database I get the following error: SQL1224N A database...
8
7881
by: Kamlesh | last post by:
Hi, How do I know the physical database path of a database. When I goto the DB2INSTANCE users's directory (/home/db2inst1), I see following folders: /db2inst1/NODE0000/SQL00001...
1
5945
by: pintur | last post by:
The message is: SQL1036C Errore di I/O durante l' accesso al database. SQLSTATE=58030 what is the proble? what for restore tables? thanks
3
2923
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news...
8
4118
by: morleyc | last post by:
Hi, until recently i was quite happy to add data sources from mssql database in visual studio and drag the datasets directly onto the form this creating a directly editable form which worked well....
0
3285
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
3266
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
2536
by: Laurynn | last post by:
# (ebook - pdf) - programming - mysql - php database applicati # (Ebook - Pdf)Learnkey How To Design A Database - Sql And Crystal Report # (ebook-pdf) E F Codd - Extending the Database Relational...
9
2327
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.