do yall use datatype Byte?

hey guys,

do yall use the datatype byte or yall always use integer for variables?

sometimes i use byte for numbers that are really small. but more or less just for fun and to practice on my bike. oops byte! haha = ))
developingprogrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Used to a very long time ago, but no longer.

Jim.
0
EirmanChief Operations ManagerCommented:
Boolean is the smallest data type .... useful with if/then ..... have you tried it?
http://office.microsoft.com/en-001/access-help/modify-or-change-the-data-type-setting-for-a-field-HA010096450.aspx
0
Gustav BrockCIOCommented:
It's very convenient when you will have only low values to enter, say 1 to 100, and wish to avoid any input of negative values.

/gustav
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

IrogSintaCommented:
Sure, as long as I'm positive that the value being stored will always be a whole number between 0 and 255.

Ron
0
Gustav BrockCIOCommented:
Day of week
Month of year
Player of a football team
Tooth in a human mouth
Extension of a road crossing
Side of a cube
Top 100 of anything
etc.

None of these can be negative.

/gustav
0
IrogSintaCommented:
Incidentally, a Byte data type uses 1 byte for storage.  An Integer uses 2 bytes, a Long uses 4 bytes, and a Double uses 8 bytes.  If we're talking about variables, this really wouldn't make much of a dent in the size of your database when you use Long in places where you can use Byte.  However, it could make a big difference if you do so in your table design especially if you have a large number of records.  You can find more info on that here: Set the field size
 
Ron
0
IrogSintaCommented:
@gustav,
Pretty good list.  The first thing that came to my mind was number of cards in a deck but I like your list much better.  One item on there intrigues me.... Extension of a road crossing.
Could you elaborate on that.  I'm thinking it's peculiar to your geographical area.  

Ron
0
Gustav BrockCIOCommented:
Cards in a deck is a good example. The play and gamble area is full of such - count of Ludo players cannot exceed four, chess players two, etc. etc. Often these counts are by definition - if a Bridge game had more than four players it wouldn't be Bridge.

Maybe extension is the wrong word for streets meeting in one "cross". We had here a major road crossing where six streets met. Chaos, of course, so it was changed to a roundabout, then later to a normal X-crossing by closing one street and turning two others into one in a Y before they reached the crossing.
Long story. Point is that you won't see 255 roads meet in one crossing nowhere.

/gustav
0
developingprogrammerAuthor Commented:
Whao SUPERB guys!!!! I'm so glad I ask everything here!! What I thought was just a silly small question, I learnt a lot! Previously I didn't know byte could only be positive, but now I know!! = )) all other numbers are all signed = )

How bout this list for byte usage?

Good deeds we've done today!
Good deeds we've done today!
Good deeds we've done today!
Good deeds we've done today!

Haha! = ))

Or iPads we've bought this year!! Haha = P

I'm so hungry guys I'm going for a byte now!! = ))) thanks everyone!! = ))
0
Gustav BrockCIOCommented:
Exactly buying and selling are not good examples as you may have returns which are negative.

Or buying is positive and selling/trashing is negative regarding your stock, thus vice versa for returns.

/gustav
0
developingprogrammerAuthor Commented:
= ))
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Due to time zone differences where y'all are at, sun spot activity, extraterrestrial aberrations and wardrobe malfunctions, I'm late to this party.

However ...
I have no fear of using Byte datatype, for pretty much all the reasons listed. One real world (in the unreal world we live in today) is ... in most of the dbs at work, I have an 'Account Status Code', 1-6. This is clearly Byte.  It's never going to be any other value. Backend tables can have anywhere from 50K to 1,000,000 records.  So ... do the math :-)
mx
0
developingprogrammerAuthor Commented:
yes mx you are late to the party!! but next time we'll wait for you!! haha = ))

whao great!! i fully agree with you that we should consider using byte for table field datatype. that is probably the most important thing!

so 2 things:

1) byte is always positive
2) byte should always be considered to be used for table field datatype!

thanks mx!! = ))
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.