Must the code field (not key field) be unique?
Posted: Wed Jan 27, 2016 12:52 pm
Hello,
I am learning to use nuBuilder and I really like this development tool. I already took a look at all 18 tutorial videos and I am reading the documentation too.
I have it installed in my vps at DIgital Ocean and I am using it to develop an application for my daughter. Every night, after arrive from my daily job where I work as a systems analyst and java developer, I use nuBuilder a bit to work on my daughter's app and remember my old times of using PHP and MySQL. Well, it was before the new technoligies like Ajax, jQuery etc. I am learning all this new stuff and loving it all.
Well, enough presentation on this first post. Let me talk about my doubt at this moment:
My application will be used by several shop owners. A shop owner can have more than one shop. Só, there is a one to many relationship between owner and shop. Also, a shop will have clients, so there is a one to many relationship between shop and client.
A client will have his client_id, sure, but I am adding a code field (easy to remember, varchar 20, as I can see on the invoicing demo). My question is: Must I model this code field as unique on the table, in order to prevent that 2 clients have the same code?
Is there any problem if two clients get the same code? Perhaps a problem on the way the object lookup works to find records in a form, or something like this. This is my fear.
Thank you in advance
Celson
I am learning to use nuBuilder and I really like this development tool. I already took a look at all 18 tutorial videos and I am reading the documentation too.
I have it installed in my vps at DIgital Ocean and I am using it to develop an application for my daughter. Every night, after arrive from my daily job where I work as a systems analyst and java developer, I use nuBuilder a bit to work on my daughter's app and remember my old times of using PHP and MySQL. Well, it was before the new technoligies like Ajax, jQuery etc. I am learning all this new stuff and loving it all.
Well, enough presentation on this first post. Let me talk about my doubt at this moment:
My application will be used by several shop owners. A shop owner can have more than one shop. Só, there is a one to many relationship between owner and shop. Also, a shop will have clients, so there is a one to many relationship between shop and client.
A client will have his client_id, sure, but I am adding a code field (easy to remember, varchar 20, as I can see on the invoicing demo). My question is: Must I model this code field as unique on the table, in order to prevent that 2 clients have the same code?
Is there any problem if two clients get the same code? Perhaps a problem on the way the object lookup works to find records in a form, or something like this. This is my fear.
Thank you in advance
Celson