Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old March 19th, 2003, 02:22 PM
wannabe wannabe is offline
=) wannabe?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2002
Location: florida
Posts: 2,153 wannabe User rank is Lance Corporal (50 - 100 Reputation Level)wannabe User rank is Lance Corporal (50 - 100 Reputation Level)wannabe User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 21 h 58 m 25 sec
Reputation Power: 9
Send a message via AIM to wannabe Send a message via Yahoo to wannabe
many queries or text file

hi,

say i have a calendar, where for each cell(day) a query is made to check if the day has events on it, if yes it selects the events.

is it better to store the event validation in a text file, like 0 for no 1 for yes, rather than query the database. or it doesn't matter?

thanks

Reply With Quote
  #2  
Old March 23rd, 2003, 07:54 PM
dotcomguy dotcomguy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: #devshed @ irc2.beyondirc.net
Posts: 231 dotcomguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 40 sec
Reputation Power: 6
Send a message via ICQ to dotcomguy Send a message via AIM to dotcomguy Send a message via Yahoo to dotcomguy
You could consider a different approach. Don't store a value declaring whether there are or are no events on that date. Simply query the database for the events on that date. Then, within your program you will know if there are no events on that date if the number of rows returned is 0.
__________________
.

Reply With Quote
  #3  
Old March 24th, 2003, 03:58 PM
wannabe wannabe is offline
=) wannabe?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2002
Location: florida
Posts: 2,153 wannabe User rank is Lance Corporal (50 - 100 Reputation Level)wannabe User rank is Lance Corporal (50 - 100 Reputation Level)wannabe User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 21 h 58 m 25 sec
Reputation Power: 9
Send a message via AIM to wannabe Send a message via Yahoo to wannabe
that's not what i was asking ...

it works and everything, i'm just saying is it better to use the text file to find out if day has events on it and then query the database, rather than query the database for each day.

Reply With Quote
  #4  
Old March 24th, 2003, 11:02 PM
dotcomguy dotcomguy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: #devshed @ irc2.beyondirc.net
Posts: 231 dotcomguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 40 sec
Reputation Power: 6
Send a message via ICQ to dotcomguy Send a message via AIM to dotcomguy Send a message via Yahoo to dotcomguy
Quote:
Originally posted by wannabe
that's not what i was asking ...

it works and everything, i'm just saying is it better to use the text file to find out if day has events on it and then query the database, rather than query the database for each day.

I know what you were asking. I simply provided an alternative solution. It seems to me you're adding an unnecessary step. You don't need to check if there are events separately from actually getting them. So, my answer would be neither.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > many queries or text file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway