Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Hello!

    I started learning ASP 3.0 which went smooth. As time progressed I thought that ASP .Net would be the language to use. Now I'm studying this language... (or not really language but whateva')
    (Using C# .Net)

    I usually used databases to store guestbook material before, but it seems like it is deprecated to use that, since most tutorials are about XML. Is it just the latest flavor or is it really something to it? Databases worked fine for me, but I'm willing to change. What should I use? What type, if databases, of database should I use? If you want me to use databases, then where can I find a good tutorial about it? If I'm supposed to use XML, how do you delete an entry in C# (preferrably code-behind)?

    Thanks
    //Henke

  2.  

  3. #2
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,665
    Member #
    1234
    Liked
    141 times
    Databases are great things to have to hold data. XML is generally used to format data and to show data in a medium multiple platforms can understand. Ultimately there's no real way to store data in XML from what I'm understanding, as it has to be statically written.

    Transio's the XML geek around here though, he may have a different opinion on this all.

    By deleting an entry, what exactly do you mean? Also out of curiousity, why are you learning C#.net instead of ASP.net given your stated background?
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  4. #3
    Junior Member Lith's Avatar
    Join Date
    Sep 2004
    Location
    Tenino, WA
    Posts
    27
    Member #
    7365
    XML and database distinction

    There is a distinction between XML and databases that you need to understand.

    XML is a markup language that allows you to put just about any type of data into a format that can be read and understood by any XML compliant software/device. The idea is that if you encapsulate your data into XML you can pass it unchanged to many different devices - web browser, palm pilot, cell phone whatever. Also using IE you can use eXtensible Stylesheet Language (XSL) to take the same chunk of XML and dynamically alter the interface presented to the user on the fly.

    A database is a different monster. DB's are usually fairly complex pieces of software (canbe tied intimately to hardware also) which specialize in data storage, data typing and data retrieval. Databases come into play when the need exists to store data in an organised fashion that can be efficiently and consistently saved and retrieved.

    The two things are not mutually exclusive. Many applications take the data stored in a database and upon retrieval immediately convert the data to an XML data structure that can then be passed through the application tiers and used, manipulated by many different components. In fact SQL server and MS-SQL provide the ability to directly convert data retrieved from the DB into XML without the need for an intervening piece of software.

    If you have a large amount (now or over time) of data that you need to organise, store and retrieve, there is really no option other than to utilise some kind of database technology in order to make this feasible.

    The decision to use XML to package and format the data is a little more complex. If you have the resources and skill base to do it however, in my opinion this is a great way to go, and has very litlle downside, as long as you are willing to build it into your application infrastructure from the ground up.

    My descriptions of both above are hardly adequate - but I hope this helps.

    Be Well...

  5. #4
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,665
    Member #
    1234
    Liked
    141 times
    Ummm... What Lith said...

    That's a great explanation of them.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  6. #5
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Quote Originally Posted by Lith
    There is a distinction between XML and databases that you need to understand.

    XML is a markup language that allows you to put just about any type of data into a format that can be read and understood by any XML compliant software/device. The idea is that if you encapsulate your data into XML you can pass it unchanged to many different devices - web browser, palm pilot, cell phone whatever. Also using IE you can use eXtensible Stylesheet Language (XSL) to take the same chunk of XML and dynamically alter the interface presented to the user on the fly.

    A database is a different monster. DB's are usually fairly complex pieces of software (canbe tied intimately to hardware also) which specialize in data storage, data typing and data retrieval. Databases come into play when the need exists to store data in an organised fashion that can be efficiently and consistently saved and retrieved.

    The two things are not mutually exclusive. Many applications take the data stored in a database and upon retrieval immediately convert the data to an XML data structure that can then be passed through the application tiers and used, manipulated by many different components. In fact SQL server and MS-SQL provide the ability to directly convert data retrieved from the DB into SQL server without the need for an intervening piece of software.

    If you have a large amount (now or over time) of data that you need to organise, store and retrieve, there is really no option other than to utilise some kind of database technology in order to make this feasible.

    The decision to use XML to package and format the data is a little more complex. If you have the resources and skill base to do it however, in my opinion this is a great way to go, and has very litlle downside, as long as you are willing to build it into your application infrastructure from the ground up.

    My descriptions of both above are hardly adequate - but I hope this helps.

    Be Well...

    Thanks for the reply! You said some stuff about the usability of XML that I already knew, like it can be processed by many different applicaitons and storing devices. This is of course a very good thing, if you have for example a program that is supposed to print an economic document or something like that; where the applications need to communicate efficiently. But now I'm just talking about the need for information transfer within a specific .net applicaiton (or many on the same site), so, isn't it better to use the database - also due to how easy it is to delete a row? (In XML many lines of code must be used)...

    I am planning of coding with some community-like features. (not a community though), so don't you think that databases would do the job well? (e.g. different tables within a database?) It's a question of what takes the most work... The skills can be learnt, so that's not really the catch...

    By deleting an entry I mean to delete an entry made of a person who wrote in the guestbook. (=name, e-mail, homepage, subject and body)

    The answer to your question, Wired, is that except knowing Classic ASP I have studied C++, which is kinda similar to C#, and that C# also can be used as a programming language, which I intend to use it for with DirectX . Also I very much dislike the syntax of VB and VBScript and VB .Net - I like it when signs make up the boundaries like:
    Code:
    if (this < that) { string strThisString += ", and that"; }
    instead of
    Code:
    if this < that then
    Dim strThisString As String
    strThisString += ", and that"
    end if
    I think I'm gonna stick with databases for some time more...

    //henke

  7. #6
    Junior Member Lith's Avatar
    Join Date
    Sep 2004
    Location
    Tenino, WA
    Posts
    27
    Member #
    7365
    Quote Originally Posted by echoSwe
    Thanks for the reply! You said some stuff about the usability of XML that I already knew, like it can be processed by many different applicaitons and storing devices. This is of course a very good thing, if you have for example a program that is supposed to print an economic document or something like that; where the applications need to communicate efficiently. But now I'm just talking about the need for information transfer within a specific .net applicaiton (or many on the same site), so, isn't it better to use the database - also due to how easy it is to delete a row? (In XML many lines of code must be used)...

    I am planning of coding with some community-like features. (not a community though), so don't you think that databases would do the job well? (e.g. different tables within a database?) It's a question of what takes the most work... The skills can be learnt, so that's not really the catch...
    You ask if a database is the way to go in order to store the data you need about your "community" members. IMO yes.

    Using XML as an alternative to this, would be a misuse the XML in general, unless I am seriously misunderstanding what you mean.

    Heres what I see you thinking about in terms of XML:
    If I use XML to handle my community member data, I will create a complex hierarchical xml structure that will hold all member records and related data. I will manipulate this XML document each time that I need to Add, Delete or Modify the member data. This XML document will be stored on my server and house my community member data.

    Is this what you are thinking when you think of using XML vs. a DB?

    Clarifying this will help me understand what you are thinking

    BTW, Wired: ASP.Net does not lock you into just VBscript or Jscript only for your server side code as traditional ASP did. Any language that can be parsed to IL can now be used to do ASP.Net, as well as any other tier of a .Net application.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    The biggest drawback to using XML as a data storage device is speed. A database is optimized (indexed) for speedy retrieval of data. Additionally, RDBMSes (RELATIONAL database management systems) maintain data relationships, allowing storage of further optimized (normalized) data. XML is a great technology, and has many good uses, but should not be used as a primary storage device for dynamic datasets of more than a couple hundred records. It would be perfectly suited for your need of a communication protocol for all of your applications, though. In fact, there are a couple such standards already in place - Web Services and XML-RPC. Check them out.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com