473,769 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating an unique record id ??

Have a database that records data taken in the field and was using an
"auto_increment ed" integer. I now want to distribute the database to others
so they can record data then centralise all the data on one database so
people can share records.

However will an "auto_increment ed" integer on it's own won't suffice? I
suppose it might if that field didn't have to be unique but is that best
practice? I was thinking along the lines of creating a unique field by
combining for 3-4 fields such as time, date, member and "auto_increment ed"
integer.

What is this technique? I am sure there's a lot of stuff already on the 'net
explaining how to achieve this but I am a bit stuck as I don't know what
search terms to use.

Cheers

Phil
Oct 9 '05 #1
4 2087
Phil Latio wrote:
Have a database that records data taken in the field and was using an
"auto_increment ed" integer. I now want to distribute the database to others
so they can record data then centralise all the data on one database so
people can share records.
There are few ways to do this:
- If you don't need to know what the id was on distributed computer,
just ignore it and assign a new id for it.
- Or add new id to identify source location. Then combine the remote id
with location id and you should have combination which would not only be
unique, but would also allow you to locate the source for given row
quite quiqly. ( It is recommended to add new table also, where are at
least two fields, id and name. ).
However will an "auto_increment ed" integer on it's own won't suffice? I
suppose it might if that field didn't have to be unique but is that best
practice? I was thinking along the lines of creating a unique field by
combining for 3-4 fields such as time, date, member and "auto_increment ed"
integer.


While this would most likely never cause problem, there would still be
possibility that at some point two users would create exactly the same
row and it could cause problems. So I suggest you not to use this.
Oct 9 '05 #2
> While this would most likely never cause problem, there would still be
possibility that at some point two users would create exactly the same
row and it could cause problems. So I suggest you not to use this.


Thanks for your reply but the answer came to me.

I'll be using a PHP form to enter the data so each field value is a seperate
variable. I could simply create a new variable based on values of the
others.

Not it tried yet but sure it will work as I did something very similar when
learning the basics of Java.

Cheers

Phil
Oct 10 '05 #3
Phil Latio wrote:
I'll be using a PHP form to enter the data so each field value is a seperate
variable. I could simply create a new variable based on values of the
others.


Are you sure it is guaranteed to be unique? That there is no way in
world that someone could enter exactly same values and get the same id?
Oct 10 '05 #4

"Aggro" <sp**********@y ahoo.com> wrote in message
news:2I******** ******@read3.in et.fi...
Phil Latio wrote:
I'll be using a PHP form to enter the data so each field value is a seperate variable. I could simply create a new variable based on values of the
others.


Are you sure it is guaranteed to be unique? That there is no way in
world that someone could enter exactly same values and get the same id?


I think so.

Cheers

Phil
Oct 10 '05 #5

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

Similar topics

2
5972
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks a group of Sales people, the customers they deal with and the business they transact with them. I've got my head around all the tables & some of the basic Query structures OK and am beginning to delve into creating the forms I need to be able...
4
8839
by: James | last post by:
Hello there, Does anyone know how to create a sequential record number field in a query?? Thanks, James
8
3306
by: Mark | last post by:
When my form goes to a new record, I have a procedure that copies the last record added to the form's underlying table into the form. The intent is that a series of new records may have the same data in many of the fields so I paste in the same values of the previous record and then edit what needs edited in the new record saving much retyping of the same data. Doing this however creates the definite possibility of creating a duplicate...
1
1645
by: Crimsonwingz | last post by:
I am setting up a database to track incoming shipments by Lot. In one shipment (lot) there will be several items that need to be associated to that lot, but need a unique number to reship by. My goal is to use Lot number - record count, but do not understand how to get a record set from within the subform. Essentially, lot 1000 has 10 pieces. Ideally, it would be Lot 1000
7
2154
by: Robin | last post by:
In a current .Net solution (using VB.Net) has a 3 tier architecture of Web interface, Data Access Layer and Database. How do I implement business logic and class layers into this solution?
4
6015
by: blee456 | last post by:
I have to create an attendance list for a meeting that will have attendees that are both on the committee and non member participants. My thinking is to create a form that has the member names listed with a check box next to their names in one section of the form, and a list box in another section to fill in those non-member attendees. To complicate matters, the report must show name and title, which are 2 distinct fields. Also, the...
1
6343
by: Danny Liberty | last post by:
I need some opionions on an issue here... Suppose I want to keep a collection of objects, each need to be uniquely identified by a number. This number has no meaning as long as it's unique, so it should be automatically generated for each new object. One more requirement is keeping the objects in the order in which they were inserted, not sorted by their ID. Considering the following options of implementation, which would be the best...
4
4825
by: crescent_au | last post by:
Hi all, I'm doing some research online on creating php-based multi-level marketing (MLM) system. It seems like a complicated system to build as I need to create one from scratch. I'd like to know if there are open-source CMS tools or MLM tools available that helps me to customize or even upgrade to the kind of system I'd like to have. I'd like to know how should I start building one from scratch- just the logics or algorithms that I...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.