oracle - When should I use a nested table and when a reference? -


how should decide whether use nested table or reference?

for example:

we have airline , flights table:

create table airline of airline_ty( token varchar2(8), description varchar2(20) )  create table flights of flights_ty( flightnumber number(10) securitylevel varchar2(10) ) 

should know make reference in airline (flights ref flights_ty) or go nested table?

it depends on requirements usage of data. in example airlines , flights flight should have foreign key airline. main table flights , airlines codebook.

an example case nested table choice:
customer in core banking application has several phone numbers, email addresses etc. need hold data customer, not evaluate (all customers email etc.), display other customer detail. cannot have table each 1 many property, because have more interesting data, accounts, loans, credit cards, account statements, behavior score cards etc.

you have take account, redundancy, reuse, importance, property vs. entity, aggregation vs. composition...


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -