?
Solved

MS Access - Unlimited or Infinity

Posted on 2004-03-28
6
Medium Priority
?
946 Views
Last Modified: 2008-03-06
Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
0
Comment
Question by:geekhelp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:eric_duncan
ID: 10701309
My understanding is that the number field has to have either a discrete value or null. I have seen other people solve this issue by "reserving" a specific value that will be used to indicate infinity - this is often the upper bound of the number field or a null value. The advantage of using null, if you don't need it otherwise, is that mathematical operations using null closely resemble mathematical operations using inifinity because the result is always null.

Let me know if this helps!

eric
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 10701406
>>Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
The simplest way is to assign an 'impossible' value as Default to the number field to represent the 'infinity' or 'unlimited' value, like put a value of -1 in your field's Default value ?
0
 
LVL 2

Expert Comment

by:Carlovski
ID: 10703739
Eric is right,
Database nulls, and infinity do share many properties, but using a Null is likely to really confuse people who aren't used to databases, or mathematics!
Also, the properties that they do share, may not be want you want (i.e nothing is ever equal to eiher Null or infinity, even null or infinity!)
The safest thing may be to hold if it is infinite value in a separate field (Being picky, numeric fields should hold discrete values)
What exactly are you trying to record?
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

Author Comment

by:geekhelp
ID: 10721508
The field is for a Doggy Daycare database - It keeps track of how many "available passes" the dog owner has on their account. When a dog is "Checked in" to our facility a pass is automatically deducted from this field.
Owners can purchase a monthly unlimited pass and I am trying to figure out how I can represent this in the database, so that it stays the same even when the field has 1 subtracted from it. Thanks
0
 
LVL 2

Accepted Solution

by:
eric_duncan earned 750 total points
ID: 10722752
There isn't any way you can make the database handle this situation automatically - you are going to have to use some application logic to figure out whether or not someone has an unlimited pass or not. Probably the easiest way to do that would be to add a Boolean field to the table to track whether or not someone has unlimited passes on their account and then check this value in your application logic.

Eric
0
 

Author Comment

by:geekhelp
ID: 10729256
Thank You all who helped reach this conclusion!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question