473,669 Members | 2,452 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 1037
On 9 Jun, 18:04, "Jonathan Wood" <jw...@softcirc uits.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 ObjectDataSourc es 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***@softcirc uits.comwrote in message
news:uf******** ******@TK2MSFTN GP06.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***@softcirc uits.comwrote in message
news:uy******** *****@TK2MSFTNG P05.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**@markNOSPA Mrae.netwrote in message
news:uQ******** *****@TK2MSFTNG P02.phx.gbl...
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:uy******** *****@TK2MSFTNG P05.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***@softcirc uits.comwrote in message
news:%2******** ********@TK2MSF TNGP05.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***@softcirc uits.comwrote in message
news:eA******** ********@TK2MSF TNGP04.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

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

Similar topics

0
3329
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 : http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96653/create_ps.htm#66206 Still i give the steps i followed. Preparing the Primary Database for Standby Database Creation
6
7335
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 agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command.
8
7891
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 /db2inst1/NODE0000/SQL00002 /db2inst1/NODE0000/SQL00003 /db2inst1/NODE0000/SQL00004
1
5959
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
2932
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 groups for years, I figure it's time for me to contribute a little bit back, maybe some people out there will find this useful. * Introduction This is a "how-to" style article, showing by example how to dynamically
8
4124
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. However i have recently started a project which will require synchronization to a remote database. Also the underlying database provider may change at a later date. From what i have read it seems that a layered approach is necessary, or at...
0
3311
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. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
3287
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. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
2548
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 Model to Capture More Meaning (1979) # Addison Wesley - Database Design for Mere Mortals chm # Addison Wesley - Refactoring Databases Evolutionary Database Design (2006) # Apress Beginning Databases with PostgreSQL From Novice to Professional...
9
2332
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, retrieving a list of tables in the database. Doing a little browsing in MSDN, I see that the abstract representation of a database appears to be the DataSet class. I also see that I can use "data adapter" classes (e.g. OdbcDataAdapter) to connect a...
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8895
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8658
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2797
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 we have to send another system
2
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.