Let's use the more standard terminology:
A
Natural Key is what you are calling the "business key": i.e. a set of columns that "naturally" belongs to and uniquely identifies the rows in a table.
A
Surrogate Key is what you called "the unique number that is auto generated since it is not avialable for the user".
1) In many cases the primary key can be defined using the natural key, e.g. if orders are identified by the business via an "Order Number", then that Order Number can also serve as the primary key.
To a large extent the decision of whether or not to use a surrogate key is a matter of taste: some people will
never use them, some people will
always use them, and others will mix and match.
Some cases when surrogate keys may be useful:
- When you really can't identify a set of columns that can uniquely identify a row. A common example is People: what uniquely identifies a person? Two different people can have the same name, date of birth and address, at least in theory.
- When the natural key is overly cumbersome: for example, even if (surname, forename, middle_name, dob, zip_code, address_line_1) was sure to be unique, would you really want to use it in all your foreign keys, queries and updates?
- When the natural key is volatile, if cascading updates of primary keys to child tables is problematic in your DBMS (e.g. Oracle doesn't have cascading updates, you have to write a lot of code yourself to handle them).
- When your application building tool of choice is designed to work best (or only) with single-column keys. (Though you could then consider getting a bettrer tool!)
The golden rule is that wherever you use a surrogate as the primary key, you
must also declare UNIQUE constraints for the natural key(s). Otherwise you can end up with the same (duplicate) data recorded several times with different surrogate key values.
2) I'm not sure what this question means - can you give an example?