A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table redesign help.. retain autonumber?



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2004, 03:46 PM
Fred Boer
external usenet poster
 
Posts: n/a
Default Table redesign help.. retain autonumber?

Hello:

I am considering a redesign of my tables. Currently I use an Autonumber
field called Book_ID, to identify records in my library table (Tbl_Library).
Now, this number has no meaning to the users of the application, so the
possiblity of gaps isn't a problem. However, it *is* used to create barcodes
which are put in the books for use in the library circulation system.

Everything works fine. However, I am a little concerned about the use of an
Autonumber field, since the numbers *are* visible to users (on the barcode
labels), and, more importantly, the possiblity that exists that the numbers
might get very long, or even go negative. A long number might not fit on the
labels, for example.

So, I've created a version of the application in which I don't use
Autonumber for Book_ID, but, instead, replace the Autonumber field with a
simple number field, and populate the field using a DMax expression as the
default value for the Book_ID field. (Kudos to Roger Carlson for his helpful
example at
http://www.rogersaccesslibrary.com/d...berProblem.mdb
!)

My question is: is there any reason to keep the old Autonumber Book_ID
field? Or is it really superfluous given the redesign?

Thanks!

Fred Boer


  #2  
Old June 25th, 2004, 01:31 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Table redesign help.. retain autonumber?

You don't need to use the AutoNumber Field in this case. Make sure you set
the custom-number-seq. Book_ID as the PK in the new database.

If you want to import Records from the old database to the new database and
you have related Records, e.g. Loans Records, that use the AutoNumber Field
for the relationship, you will need to take care to relate the Records
correctly in the new database.

--
HTH
Van T. Dinh
MVP (Access)




"Fred Boer" wrote in message
...
Hello:

I am considering a redesign of my tables. Currently I use an Autonumber
field called Book_ID, to identify records in my library table

(Tbl_Library).
Now, this number has no meaning to the users of the application, so the
possiblity of gaps isn't a problem. However, it *is* used to create

barcodes
which are put in the books for use in the library circulation system.

Everything works fine. However, I am a little concerned about the use of

an
Autonumber field, since the numbers *are* visible to users (on the barcode
labels), and, more importantly, the possiblity that exists that the

numbers
might get very long, or even go negative. A long number might not fit on

the
labels, for example.

So, I've created a version of the application in which I don't use
Autonumber for Book_ID, but, instead, replace the Autonumber field with a
simple number field, and populate the field using a DMax expression as the
default value for the Book_ID field. (Kudos to Roger Carlson for his

helpful
example at

http://www.rogersaccesslibrary.com/d...berProblem.mdb
!)

My question is: is there any reason to keep the old Autonumber Book_ID
field? Or is it really superfluous given the redesign?

Thanks!

Fred Boer




  #3  
Old June 25th, 2004, 01:18 PM
Fred Boer
external usenet poster
 
Posts: n/a
Default Table redesign help.. retain autonumber?

Thanks, Van!

Fred

"Van T. Dinh" wrote in message
...
You don't need to use the AutoNumber Field in this case. Make sure you set
the custom-number-seq. Book_ID as the PK in the new database.

If you want to import Records from the old database to the new database

and
you have related Records, e.g. Loans Records, that use the AutoNumber

Field
for the relationship, you will need to take care to relate the Records
correctly in the new database.

--
HTH
Van T. Dinh
MVP (Access)




"Fred Boer" wrote in message
...
Hello:

I am considering a redesign of my tables. Currently I use an Autonumber
field called Book_ID, to identify records in my library table

(Tbl_Library).
Now, this number has no meaning to the users of the application, so the
possiblity of gaps isn't a problem. However, it *is* used to create

barcodes
which are put in the books for use in the library circulation system.

Everything works fine. However, I am a little concerned about the use of

an
Autonumber field, since the numbers *are* visible to users (on the

barcode
labels), and, more importantly, the possiblity that exists that the

numbers
might get very long, or even go negative. A long number might not fit on

the
labels, for example.

So, I've created a version of the application in which I don't use
Autonumber for Book_ID, but, instead, replace the Autonumber field with

a
simple number field, and populate the field using a DMax expression as

the
default value for the Book_ID field. (Kudos to Roger Carlson for his

helpful
example at


http://www.rogersaccesslibrary.com/d...berProblem.mdb
!)

My question is: is there any reason to keep the old Autonumber Book_ID
field? Or is it really superfluous given the redesign?

Thanks!

Fred Boer






  #4  
Old June 25th, 2004, 02:03 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Table redesign help.. retain autonumber?

Fred

You probably already considered this, but if your Autonumber (PK) field is
used as a foreign key in any other tables (one-one, one-many), you'll need
to keep the value. Or you could decide to dump it, after updating all
"child" tables with the new ID.

--
Good luck

Jeff Boyce
Access MVP

  #5  
Old June 25th, 2004, 02:21 PM
Fred Boer
external usenet poster
 
Posts: n/a
Default Table redesign help.. retain autonumber?

Hello, Jeff!

Yes, I have recreated all of the relationships to refer to the new BookID
number. I couldn't *think* of a good reason to keep the old Autonumber
field, but over the years I've learned to ask first rather than regret it
later.. g

Thanks a lot!

Fred


"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
Fred

You probably already considered this, but if your Autonumber (PK) field is
used as a foreign key in any other tables (one-one, one-many), you'll need
to keep the value. Or you could decide to dump it, after updating all
"child" tables with the new ID.

--
Good luck

Jeff Boyce
Access MVP



 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A different autonumber question - single column table Tim Ward Database Design 20 July 9th, 2004 06:29 PM
resize table from A4 size to A5 ims New Users 3 June 9th, 2004 01:05 AM
COMPARE THE TWO TABLES Stefanie General Discussion 0 June 4th, 2004 04:36 PM
Assigning a Specified Unique ID M Johnson Database Design 5 May 20th, 2004 10:01 PM
reset autonumber value in table Database Design 0 April 29th, 2004 02:11 PM


All times are GMT +1. The time now is 07:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.