Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2007, 11:59 AM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default xml extension

Hello!

I'm making a forums poll!
Basically I need three tables:

Forums_Polls <PollID | Addeddate... | Question>
Forums_Polls_Choices <ChoiceID, Priority, PollID>
Forums_Polls_Votes <PollID | Membername | Vote>

Why do I need the Forums_Polls_Votes table?
Because I need to know if some user already voted on current Poll.
If he voted then I show him the results, else, I show him the checkboxs for he vote!

But I'm concerned about my future here... If I have 20 polls, and 500 members (+/-) placed a vote on each poll, I'll have (20x500) records in a few days on Forums_Polls_Votes table...

I'm thinking on xml extension, just for save Forums_Polls_Votes
For poll 27 I'll have poll27.xml
If I delete one poll, only delete one file.

The xml would be:
....
<pollVote membername="maxxim" vote="7">
....

I only need to add more nodes. I don't need to update existent votes!

With this I decrease a lot my database size!

My question:
It's efficient? fast?

I'll wait some testimonials...

 
Old October 26th, 2007, 04:29 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

max,

i think no matter what, you'll have better resource usage and cpu efficiency if you use sqlserver. i know for sure that reading files from disk is much more intensive than reading databse info. of course, you could cache the info but of course, you'd do this in the DAL anyway in 'conventional' db usage.

i don't think i can offer support to your thoughts here as you'll be battling with an unknown resource - file size. it really could just get so big that you'd fill available shared memory just loading the 'latest' xml file. my advice, if you've got a seperate sqlserver instance, use it as it'll be almost certainly on a seperate cpu, therefore you'll be psuedo multitasking.

tough one tho, given the simplicity of xml. but for 'globally' updateable data, xml isn't a great choice as it certainly will tie up your local rsource usage which in turn means all other 'web' access to your site.

jimi

http://www.originaltalent.com
 
Old October 26th, 2007, 04:41 PM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jimi, thanks for your opinio!

It's that I need to Know: How does aspenet add more nodes to an xml file?

If (aspnet retrieve all nodes, add a new node and then re-save all nodes) then it is bad
If (aspnet DON'T retrieve all nodes, and just add one node to the end of xml) then it is good

I really don't know if it's really so bad because I'll have one xml file for poll, and I can get the dataset (the DS will only have 2 columns) make the poll Counts and then dispose dataset!

One of the many advantages of xml is the fastness of reading!

I'm considering this possibility because I only have 2 databases with 200 Mb each.

I posted this doubt on wrox asp.net forum but don't had any hawsers until now!

Thanks one more time for your opinion!

 
Old October 26th, 2007, 05:55 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

max,

the bad news is that xml files are treated like any sequencial file and to append, the entire file must be opened. the only 'win' you'd get would be if you were caching the file object (which incidently, i do with xml) and were doing many reads without writes to the file. this unfortunately is how discreet file access works. of course, you could create a virtual xml objectsource which then would allow for appending only the last item but this too would need to be managed and ultimately saved at some point.

i'm still thinking 'sqlserver'... but then again, debates like this bring lots of new methods to the surface, so never say never!!

jimi

http://www.originaltalent.com
 
Old October 26th, 2007, 06:40 PM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks one more time Jimi! This is true!

I like more sql. I only used xml when I work with Flash!

I'll wait the opinion from the other side: XML defender ! :)

 
Old October 27th, 2007, 04:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Chalk up my vote for SQL too :) I really would think the amount of data would not be significant. 10,000 rows is nothing really, and judging by the purpose, your tables would be rather narrow (i.e not making up for too much data each).

If your site gets that popular, I'm sure you'll be able to either get some donations or leverage some google-ads to ensure you can get either more databaseisze, or an extra database ;)

http://entropia-online.blogspot.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
how the extension is make? edulcni Intro Programming 0 October 19th, 2007 12:31 PM
Chapter 5 CMS extension yousaid BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 14 April 23rd, 2007 03:34 PM
Extension-Attribute-15 r_ganesh76 C# 0 June 14th, 2006 07:46 AM
What file extension should I use? pigtail Javascript 3 April 12th, 2004 02:58 PM
Server Extension using C++ Margaret Wright C++ Programming 2 December 17th, 2003 06:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.