W
Webtechie
Hello,
I am designing a guest database. Guests leads will be entered into the
Guest Table each day. There should be about 300 leads entered into the guest
table each day.
So I am thinking that I need a primary key.
Scenario #1
========
Table - tblGuest
Primary key = GuestID - autonumber
Now if the guest were ever deleted (no sure why we would need to), it would
mess up my sequential order
GuestID FirstName LastName
1 Tom Jones
2 Susan Smith * deleted
3 Matt Francis
Then I would end up with
GuestID FirstName LastName
1 Tom Jones
3 Matt Francis
So I might need to change my design:
Scenario #2
=======
Table - tblGuest
Primary key = tblGuestID - autonumber
Field to reference = GuestID - number
I would get a max on each transaction and then assign it to my GuestID
tblGuestID GuestID FirstName LastName
1 1 Tom Jones
2 2 Susan Smith * deleted
3 2 Matt Francis (AFTER
GETTING MAX GUESTID)
Question:
Is this a good design? Do I even need to worry about sequential order for a
data entry table? If I just used the autonumber ID, even if a guest gets
deleted that shouldn't throw my referencing the other guests off for
reporting.
I'm leaning toward Scenario #1, but wanted to get the input of those that
know Access table design better than me.
Thanks,
Tony
I am designing a guest database. Guests leads will be entered into the
Guest Table each day. There should be about 300 leads entered into the guest
table each day.
So I am thinking that I need a primary key.
Scenario #1
========
Table - tblGuest
Primary key = GuestID - autonumber
Now if the guest were ever deleted (no sure why we would need to), it would
mess up my sequential order
GuestID FirstName LastName
1 Tom Jones
2 Susan Smith * deleted
3 Matt Francis
Then I would end up with
GuestID FirstName LastName
1 Tom Jones
3 Matt Francis
So I might need to change my design:
Scenario #2
=======
Table - tblGuest
Primary key = tblGuestID - autonumber
Field to reference = GuestID - number
I would get a max on each transaction and then assign it to my GuestID
tblGuestID GuestID FirstName LastName
1 1 Tom Jones
2 2 Susan Smith * deleted
3 2 Matt Francis (AFTER
GETTING MAX GUESTID)
Question:
Is this a good design? Do I even need to worry about sequential order for a
data entry table? If I just used the autonumber ID, even if a guest gets
deleted that shouldn't throw my referencing the other guests off for
reporting.
I'm leaning toward Scenario #1, but wanted to get the input of those that
know Access table design better than me.
Thanks,
Tony