Jumat, 19 April 2013

[MS_AccessPros] Re: The size of an Access database

 

Ray

There are two basic types of character fields. Variable length (varchar) and fixed length (char). Access uses the varchar type. That means, as Clive said, only the needed space is allocated to each text field. The size is really only the maximum size. If the postal code is never bigger than 10, then you should set the field's size to 10 so extra characters are not typed in by accident.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "Ray" <rayfrew@...> wrote:
>
> Hi Clive
>
> Thanks for your thought. I was only using postcode as an example of a field. There are usually many text fields in the databases I look at - usually to do with training and training courses.
>
> It's interesting that Access defines / allocates the space as it's needed.
>
> Thanks
> Ray
>
> --- In MS_Access_Professionals@yahoogroups.com, "Clive" <zctek@> wrote:
> >
> > Hi Ray,
> >
> > The space defined for a Text field is not used until you
> > enter a value that nearly fills the defined allocation.
> >
> > If your PostCode field is for the UK Only then it is OK
> > to have a 10byte field, probably with a format of '>'
> > and an Inputmask of '>CCCCCCCCCC' to force it to
> > uppercase.
> >
> > Regards, Clive.
> >
> > --- In MS_Access_Professionals@yahoogroups.com, "Ray" <rayfrew@> wrote:
> > >
> > > I'm pondering about the amount of disc space a database takes and wondered if you could help. If I design tables with field sizes that should be just big enough for the data e.g. UK postcode as a 10 character text field, is that better than taking the default 50 characters? Does Access take the amount of disc space it needs to hold the actual data stored or does it reserve the whole amount as defined in the table definition?
> > >
> > > Any thoughts or pointer would be helpful.
> > > Thanks
> > > Ray
> > >
> >
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
MARKETPLACE


.

__,_._,___

Tidak ada komentar:

Posting Komentar