0
XML or MySQL database
Explorer
,
/t5/dreamweaver-discussions/xml-or-mysql-database/td-p/940572
May 08, 2008
May 08, 2008
Copy link to clipboard
Copied
This topic will hopefully help me clear my head to determine
the best practice.
My Question is:
What are the advantages/disadvantages of retrieving data onto a web page using XML data (probably generated from a MySQL database) over just pulling data straight from the database?
I have a choice of using both, but hopefully from your replies I'll be able to understand where both options have their uses and where I can determine the way to go project by project.
Cheers
My Question is:
What are the advantages/disadvantages of retrieving data onto a web page using XML data (probably generated from a MySQL database) over just pulling data straight from the database?
I have a choice of using both, but hopefully from your replies I'll be able to understand where both options have their uses and where I can determine the way to go project by project.
Cheers
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/xml-or-mysql-database/m-p/940573#M91885
May 08, 2008
May 08, 2008
Copy link to clipboard
Copied
Macnimation wrote:
> What are the advantages/disadvantages of retrieving data onto a web page using
> XML data (probably generated from a MySQL database) over just pulling data
> straight from the database?
XML is designed as a platform neutral way of sharing information. If you
want to give others access to your data so that they can incorporate it
into their own website or news aggregator, use XML. If you want to
incorporate the data into your own website, it's usually better to grab
it directly from the database.
However, if the information doesn't change very often, you might want to
consider generating an XML document from the database and accessing that
for your web pages, as it saves sending a request to the database every
time the page is viewed. The downside of doing that is that
incorporating data from XML is usually more complex than grabbing it
from the database.
There's no simple answer; it basically boils down to how you want to use
the information.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
> What are the advantages/disadvantages of retrieving data onto a web page using
> XML data (probably generated from a MySQL database) over just pulling data
> straight from the database?
XML is designed as a platform neutral way of sharing information. If you
want to give others access to your data so that they can incorporate it
into their own website or news aggregator, use XML. If you want to
incorporate the data into your own website, it's usually better to grab
it directly from the database.
However, if the information doesn't change very often, you might want to
consider generating an XML document from the database and accessing that
for your web pages, as it saves sending a request to the database every
time the page is viewed. The downside of doing that is that
incorporating data from XML is usually more complex than grabbing it
from the database.
There's no simple answer; it basically boils down to how you want to use
the information.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
DarrenFMc
AUTHOR
Explorer
,
/t5/dreamweaver-discussions/xml-or-mysql-database/m-p/940574#M91886
May 08, 2008
May 08, 2008
Copy link to clipboard
Copied
Spooky David...I was sitting at my desk browsing through your
"PHP for Dreamweaver 8" Book (Dog eared now) on my lap when your
response came in.
Thanks for the straight forward explanation. This means then that I can leave out on using the XML option for this particular project.
The problem I am having at the moment, and I've even experimented with Spry in Dreamweaver CS3 also, is that I have 6 Major Categories.
Each Category has several Subcategories.
Each subCategory has a few PowerPoint Presentations.
Each Powerpoint row will have Cells:
Name | link | Level | Role
I simply want to be able to create a Database Structure to display the data on the page:
Category Name 1
Subcategory 1
Presentation1: Name | link | Level | Role
Presentation2: Name | link | Level | Role
Subcategory 2
Presentation1: Name | link | Level | Role
Presentation2: Name | link | Level | Role
I need to also create an Admin Back end to make it easy for Managers to Add new Records.
I'm just having difficulty getting my head around using MySQL to associate more than one PowerPoint to a record.
Thanks for the straight forward explanation. This means then that I can leave out on using the XML option for this particular project.
The problem I am having at the moment, and I've even experimented with Spry in Dreamweaver CS3 also, is that I have 6 Major Categories.
Each Category has several Subcategories.
Each subCategory has a few PowerPoint Presentations.
Each Powerpoint row will have Cells:
Name | link | Level | Role
I simply want to be able to create a Database Structure to display the data on the page:
Category Name 1
Subcategory 1
Presentation1: Name | link | Level | Role
Presentation2: Name | link | Level | Role
Subcategory 2
Presentation1: Name | link | Level | Role
Presentation2: Name | link | Level | Role
I need to also create an Admin Back end to make it easy for Managers to Add new Records.
I'm just having difficulty getting my head around using MySQL to associate more than one PowerPoint to a record.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/xml-or-mysql-database/m-p/940575#M91887
May 08, 2008
May 08, 2008
Copy link to clipboard
Copied
> I'm just having difficulty getting my head around using
MySQL to associate
> more than one PowerPoint to a record.
You need to understand relational databases and how to relate data between
tables.
CATEGORIES: CategoryID, CategoryName
SUBCATEGORIES: SubcategoryID, parentCategoryID, SubcategoryName
PPTFILES: SubCategoryID, PPTID, PPTname
you'd then use JOINS to query the data across all the tables and build the
relation, then loop through the returned records to create your hierarchy.
You could also combind the category tables into one using a 'parentID' type
of field to reference the parent category. All top-level categoreies then
have a parentID of '0' to indicate that they are top-level categories.
-Darrel
> more than one PowerPoint to a record.
You need to understand relational databases and how to relate data between
tables.
CATEGORIES: CategoryID, CategoryName
SUBCATEGORIES: SubcategoryID, parentCategoryID, SubcategoryName
PPTFILES: SubCategoryID, PPTID, PPTname
you'd then use JOINS to query the data across all the tables and build the
relation, then loop through the returned records to create your hierarchy.
You could also combind the category tables into one using a 'parentID' type
of field to reference the parent category. All top-level categoreies then
have a parentID of '0' to indicate that they are top-level categories.
-Darrel
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
DarrenFMc
AUTHOR
Explorer
,
/t5/dreamweaver-discussions/xml-or-mysql-database/m-p/940576#M91888
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
thanks for the response.
I decided to go the difficult route, as I think that relational connections in the end were not required as very little updating will be done.
I decided to create 6 record sets, each record set was filtered to only display records containing both the Category and subcategory entries required. This works fine for the moment.
I decided to go the difficult route, as I think that relational connections in the end were not required as very little updating will be done.
I decided to create 6 record sets, each record set was filtered to only display records containing both the Category and subcategory entries required. This works fine for the moment.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/dreamweaver-discussions/xml-or-mysql-database/m-p/940577#M91889
May 10, 2008
May 10, 2008
Copy link to clipboard
Copied
I do not know if this will help or not. Try going to:
http://admin.adobe.acrobat.com/_a200985228/p30615407/
This guy did a great job with this training video on spry and getting data back from XML and straight from the DB Server. In later vidoes he explains why json is even better.
Here is his home site with all the links:
http://ray.camdenfamily.com/
Hope that helps.
http://admin.adobe.acrobat.com/_a200985228/p30615407/
This guy did a great job with this training video on spry and getting data back from XML and straight from the DB Server. In later vidoes he explains why json is even better.
Here is his home site with all the links:
http://ray.camdenfamily.com/
Hope that helps.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

