Data type for primary database key

I am creating a database, and in the tables the value of the primary key is 1 2 3 4, etc. My teacher said that I can use number (4) for the primary key data type.

However, some suggest that I use 'int (20) unsigned'

I am very confused that I should use ...

Database is Oracle

+4
source share
1 answer

There is no single right or wrong type for key attributes. Choose a data type that accurately represents the business domain and meets the requirements of who or someone should use the key.

+4
source

Source: https://habr.com/ru/post/1401479/


All Articles