473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Field Size Help

I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space
Nov 12 '05 #1
13 4128
Andrew,

Boolean only needes 1 bit so that will be the least amount of space.
Depends on which datatype you *need* of course.

--
Hope this helps
Arno R
"Andrew" <an****@nospam.com> schreef in bericht
news:%c**************@newsfep1-gui.server.ntli.net...
I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space


Nov 12 '05 #2
rkc

"Andrew" <an****@nospam.com> wrote in message
news:%c**************@newsfep1-gui.server.ntli.net...
I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space


The Byte data type can hold a number between 0 and 255.

Nov 12 '05 #3
In most programming languages Boolean represents 1 bit, but the language
uses 1 byte to store the data. I'm guessing that Access would do the same.

"Arno R" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl...
Andrew,

Boolean only needes 1 bit so that will be the least amount of space.
Depends on which datatype you *need* of course.

--
Hope this helps
Arno R
"Andrew" <an****@nospam.com> schreef in bericht
news:%c**************@newsfep1-gui.server.ntli.net...
I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space


Nov 12 '05 #4
TC
Andrew, the saving in space from choosing boolean versus number versus
anything else, will be absolutely >negligible< in a 14,000 record table.
Forget disk space. Choose your data types based on the type of the data! If
it is boolean & does not need nulls - use boolean (yes/no). If it is a
number, use a numeric type, & so on.

HTH,
TC
"Andrew" <an****@nospam.com> wrote in message
news:%c**************@newsfep1-gui.server.ntli.net...
I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space

Nov 12 '05 #5
TC
Nope :-)

Jet (the underlying database engine) only stores a single bit per boolean.

TC
"paii, Ron" <pa**@packairinc.com> wrote in message
news:vq************@corp.supernews.com...
In most programming languages Boolean represents 1 bit, but the language
uses 1 byte to store the data. I'm guessing that Access would do the same.

"Arno R" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl...
Andrew,

Boolean only needes 1 bit so that will be the least amount of space.
Depends on which datatype you *need* of course.

--
Hope this helps
Arno R
"Andrew" <an****@nospam.com> schreef in bericht
news:%c**************@newsfep1-gui.server.ntli.net...
I have a database of over 14,000 records

I want to change a field (1 chr in length)

Will I be better off using;

yes/no ?

A number 1,2

or leave as 1 char

Not sure which uses the least amount of space



Nov 12 '05 #6
rkc

"TC" <a@b.c.d> wrote in message news:1068264751.471364@teuthos...
Nope :-)

Jet (the underlying database engine) only stores a single bit per boolean.


Are you sure about that?

Nov 12 '05 #7
TC

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:uL******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068264751.471364@teuthos...
Nope :-)

Jet (the underlying database engine) only stores a single bit per
boolean.
Are you sure about that?

Absolutely! See google message ID:

<1041905202.757465@teuthos>

TC
Nov 12 '05 #8
TC
And: that is why boolean columns can never be null. (See that post.)

TC
"TC" <a@b.c.d> wrote in message news:1068269325.923190@teuthos...

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:uL******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068264751.471364@teuthos...
Nope :-)

Jet (the underlying database engine) only stores a single bit per

boolean.

Are you sure about that?

Absolutely! See google message ID:

<1041905202.757465@teuthos>

TC

Nov 12 '05 #9
rkc

"TC" <a@b.c.d> wrote in message news:1068269325.923190@teuthos...

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:uL******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068264751.471364@teuthos...
Nope :-)

Jet (the underlying database engine) only stores a single bit per

boolean.

Are you sure about that?

Absolutely! See google message ID:


O.K. Much greater minds than me seem to have accepted your findings
on this.


Nov 12 '05 #10
rkc

"TC" <a@b.c.d> wrote in message news:1068270245.243130@teuthos...
And: that is why boolean columns can never be null. (See that post.)


Even it if booleans were/are stored as a byte, the engine would be
responsible for not allowing nulls. That's it's job, eh?
Nov 12 '05 #11
TC

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:j5******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068270245.243130@teuthos...
And: that is why boolean columns can never be null. (See that post.)


Even it if booleans were/are stored as a byte, the engine would be
responsible for not allowing nulls. That's it's job, eh?


?

There's nothing conceptually wrong with a null boolean. They >should be<
nullable, just like every other column type. They certainly are in other
RDBMS such as Oracle. It is only the silly design decision, of some
luckily-unnamed person at microsoft, which means they can't be null in Jet.

Cheers,
TC

Nov 12 '05 #12
TC

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:6v*******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068269325.923190@teuthos...

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:uL******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068264751.471364@teuthos...
> Nope :-)
>
> Jet (the underlying database engine) only stores a single bit per

boolean.

Are you sure about that?

Absolutely! See google message ID:


O.K. Much greater minds than me seem to have accepted your findings
on this.


Great minds think alike !!

TC

Nov 12 '05 #13
rkc

"TC" <a@b.c.d> wrote in message news:1068340450.73744@teuthos...

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:j5******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1068270245.243130@teuthos...
And: that is why boolean columns can never be null. (See that post.)


Even it if booleans were/are stored as a byte, the engine would be
responsible for not allowing nulls. That's it's job, eh?


?

There's nothing conceptually wrong with a null boolean. They >should be<
nullable, just like every other column type. They certainly are in other
RDBMS such as Oracle. It is only the silly design decision, of some
luckily-unnamed person at microsoft, which means they can't be null in

Jet.

The people in comp.databases.theory could argue about that for weeks.

If I absolutely need yes/no/unknown I'll use a byte.


Nov 12 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
5
by: Mike | last post by:
I'm using a script provided by e-mailanywhere, it's a little too big for me. There's 1 text field and 1 password field in a form. OnSubmit, I would like both fields to be validated to look for...
6
by: tm | last post by:
I am trying to reference a table entry (qtyonhand) populated from a recordset. There is only one record displayed on this table. When i try to compare this displayed field to an input field...
3
by: Roy Adams | last post by:
Hi I'm reposting this question because for some reason can't post follow up question to this thread. What I'm trying to do is put the value and text from a a select in to a text field and to a...
1
by: Steve Darby | last post by:
Hi there, I wonde if anyone can help me. I have a couple of problems which I am having trouble resolving. Firstly, I have written a form which includes field for First Name, Surname and...
4
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a...
6
by: Lauren Wilson | last post by:
Hi Folks, I am totally confused about the following: 1. Is it possible to change the size of an EXISTING TEXT table field in Access 2k or later using DAO or ADO code? 2. If so, does anyone...
11
by: pmarisole | last post by:
I am trying to use the vbscript "split" function on a multi-select field. I am trying to do a mass update of several records at a time. I am getting an error and I'm not sure what to do. Here is...
16
by: Mark | last post by:
Hello. I am attempting to use AppendChunk() to write binary data to a memo field in Access 2000. My initial call to AppendChunk() results in a data type conversion error. Any suggestions? Here...
0
by: S Wheeler | last post by:
Hi All - I am creating a upgrade utility that transfers an bin / exe image over an xml stream. But I can not seem to get the deserialization of the binary field to work correctly. What I have is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.