Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 26th, 2007, 11:59 AM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
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...

  #2 (permalink)  
Old October 26th, 2007, 04:29 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
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
  #3 (permalink)  
Old October 26th, 2007, 04:41 PM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
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!

  #4 (permalink)  
Old October 26th, 2007, 05:55 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
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
  #5 (permalink)  
Old October 26th, 2007, 06:40 PM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
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 ! :)

  #6 (permalink)  
Old October 27th, 2007, 04:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
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/
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:02 AM.


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