close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

assigning ID's

Thread began 2/14/2010 6:20 pm by ssemere321379 | Last modified 2/17/2010 2:38 pm by Jason Byrnes | 838 views | 5 replies |

ssemere321379

assigning ID's

Do you have some rule of thumb when assigning ID's for the following tables in the database:
1. Products
2. orders
3. users

the shop intending to use the database can be considered medium with products upto 2000, customers upto 200000.
I am hopping the ID are future proof.

Sign in to reply to this post

Jason ByrnesWebAssist

Normally a primary key ID column is set to be an integer. the rule of thumb is to set it to Auto Increment, this will start at 1 and automatically increment to the next value each time a new record is added. the value of an integer can be up to 2,147,483,647.

Sign in to reply to this post

ssemere321379

That I know of course. may be my question was not clear.
I am assuming the max. number of items in the shop are 2000 items:
PRODUCTS ID from 1-2000

I do not know how many customers AND orders there will be. But I can imagine 200,000 customers and 2,000,000 orders:
CUSTOMERS ID from 2000-200000
ORDERS ID from 200,001-2,000,000

I am assigning the other tables ID's in that way. Is this the right way to do?
Or I can have the same set of integers for any ID without any problem such as this one
CUSTOMERS ID from 2000-200000
ORDERS ID from 2000-200000

If the database is designed right way from the beginning, it would make less headache in the future incase I need to improve it.

Sign in to reply to this post

Jason ByrnesWebAssist

the id column in each table can contain the same values.

CUSTOMERS ID from 2000-200000
ORDERS ID from 2000-200000


is perfectly acceptable.

Sign in to reply to this post

Office Guy-172461

Hey Jason,

I think you meant to say acceptable.

Sign in to reply to this post

Jason ByrnesWebAssist

that's what I get for relying on spell check....


thanks.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...