Jump to content
Server Maintenance This Week. ×

Scout Database


This topic is 1503 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am developing a database for my scout headquarters and it has the following structure that is shown in the attached image.
But we are facing a problem because we would like the ID of both the scout and the team to be unique and sequential.

Will it be possible?
I appreciate your help;)

unnamed.gif

Link to comment
Share on other sites

What do you mean by team?

You can assign validation to any field to ensure that it is unique. However, a troop number would not be used as a key in a relationship. Keys are unique and meaningless. all the fields in the above ERD with the suffix Id would be key values, and I would suggest using Get (UUID) as an auto-entered value. (Not a serial number )

Link to comment
Share on other sites

This is very confusing. First you said "the scout and the team". Now it seems to be about staff members and scouts.

If staff members and scouts are records in the same table (they don't seem to be in the ERD you have posted), then they will share the same set of IDs. If you're using auto-entered serial numbers, then each ID will be unique - but the numbers of each subset will not be sequential. I don't see a good reason for this requirement. If you delete a record, then the sequence will be broken anyway, so why bother with it in the first place?

If staff members and scouts are records in separate tables, then the IDs can be sequential for each set (again, until you delete a record). You can use different prefixes in each table to make sure they are mutually unique - e.g. S005 for  a scout, P005 for a staff member. Or start the series at different numbers, so that they never overlap.

 

44 minutes ago, bcooney said:

I would suggest using Get (UUID) as an auto-entered value. (Not a serial number )

I would suggest exactly the opposite. Serial numbers are easy to check visually and faster to index. The only reason to use UUIDs, IMHO, is when you have more than one system creating new records independently.

 

Edited by comment
Link to comment
Share on other sites

Yes, basically that's it!

We have to use a letter to differentiate the staff from the scouts, but it was proposed to use only one serial for the entire database.

In other words, a scout with ID 75 will stay with him forever without the need to change.

Link to comment
Share on other sites

If they are in the same table, then there is only one table to look in. If they are in two tables, and you don't want to use letters, then use different series - e.g. start staff members from 1 and scouts from 10,000. I already mentioned this option earlier.

 

Link to comment
Share on other sites

This topic is 1503 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.