L
L
link002015-04-16 08:56:35
SQL
link00, 2015-04-16 08:56:35

Can anyone explain the essence of the "One True Lookup Table" design pattern?

Something didn't google in Russian

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AdvanTiSS, 2015-04-23
@link00

It's not a pattern, it's an anti-pattern. It lies in the fact that beginners often use one universal table to store entities of different types.
Idea: instead of using three lookup tables

create table order_status (status_code varchar2(10), status_desc varchar2(40) );
create table country (country_code varchar2(3), country_name varchar2(30) );
create table priority (priority_no number(1), priority_desc varchar2(40) );

Why not use one table like
create table lookup (
lookup_type varchar2(10), 
lookup_code varchar2(20), 
lookup_desc varchar2(100) );

Details here tonyandrews.blogspot.cz/2004/10/otlt-and-eav-two-b...
Learn English, it will be hard without it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question