Why use Look up Table

Hi guys,.

Why should we use lookup table?

As I had we use just for table of correspondence:
Save storage space.
Make it easy for end users to add NEW values to be taken of LOV.
is this true? But no, this means more time to get the result of the query (because it must use JOIN)?

for example Lookup Table:
column_A_ID , Column_B_value
1, xxxxxxxxxxx
2, yyyyyyyyyyyy
3, zzzzzzzzzzzz
.......
....
To save the table of storage space in The Master, we store the ID instead of the value, and allows us to retrieve the value of the eyes to the top of table of the JOIN REPORT...

So, is it too essential to use Look up table?

Kind regards
Fateh

Fateh says:

Why should we use lookup table?

As I had we use just for table of correspondence:
Save storage space.
Make it easy for end users to add NEW values to be taken of LOV.
is this true?

N ° we use it because it is required by the standardization of the database and relational algebra. (See link above)

To save the table of storage space in The Master, we store the ID instead of the value, and allows us to retrieve the value of the eyes to the top of table of the JOIN REPORT...

There is no need or the guarantee that the FK value less space storage uses the referenced value:

create table t
as
select 999999 n, cast('ABC' as varchar2(20 char)) v from dual;

Table created.

desc t

Column     Data Type     Length
N     NUMBER          22
V     VARCHAR2        20     

select dump(n), dump(v) from t;

DUMP(N)                          DUMP(V)
-------                          -------
Typ=2 Len=4: 195,100,100,100     Typ=1 Len=3: 65,66,67

Some of the unique ID values generated original packed APEX applications using SYS_GUID() which gave rise to 40 digit keys.

So, is it too essential to use Look up table?

Yes, to produce a normalized data model. In circumstances exceptional denormalization for performance reasons can be done later.

Tags: Database

Similar Questions

  • Why use flatfiles?

    Dear Experts...


    Worldwide real applications/warehouse...why do ppl use external tables to flat files?

    Is it because the data in flat files change constantly?

    A reason...? pls explain?

    Rgds
    s

    Hello

    Do you mean why use SQLLoader external table? Oracle advises external table on SQLLoader, you can later the external table to point to another real file and read from it, you can also have several data files (set up external tables and add multiple data files) and read in parallel and also there are some interesting features such as the preprocessor to read compressed files or whatever (given that the preprocessor can do everything what you want).

    See the following regarding the use of the preprocessor with external tables in OWB 11 g material 1/10 gr 2
    http://blogs.Oracle.com/warehousebuilder/2009/06/file_staging_using_external_table_preprocessor.html

    Or using the following illustration 11 GR 2;
    http://blogs.Oracle.com/warehousebuilder/2009/10/owb_11gr2_bulk_file_loading_-morefaster_easier.html

    See you soon
    David

  • Using a look up table

    Hello

    I have a look up table (user_info_table) in their field sales sample which is a stand alone table. I have to pull the data for region East, based on which connects. The user group comes in through the Session variable.

    1. when newspapers user-A in his group is "GROUP-A", which corresponds to the region "IS" in the eyes to the top of table.
    2. when a user B connects his group is 'GROUP-B', which corresponds to the 'SOUTH' region in the eyes to the top of table.

    I need to use the SQL in the filter "upper (Region) = (select upper (Region) user_info_table where user_info.group = ' user-A group of the session variable). What would be the corerct syntax and my approach is correct?

    Thank you.

    It is preferable that you create the block of session initialization to get the region for each user...
    If several regions one retrieve horizontal GB for the initialization variable...

    This initialization block must contain a query such as:
    Select upper (Region) in user_info_table where user_info.group = valueof (NQ_SESSION. GROUP)

    set a session variable to the block of initialization above say: Region_Info...

    Now, apply this filter at the front end and filter it to the session variable, i.e. Region_Info
    In addition, you can try with group filters that restrict data based on the user... called security at the level data...

    For more information abt Google this...

  • Hello! can any1 pls let me know how to create a look up table in labview and use it in the vi.


    If the lookup table will always stay the same (for example, a character generator or something similar), you can put the values into a constant matrix 2D on your diagram, with the input as a column, the equivalent in the other value. When you need to search you use an array of index to return all values in the "input" column, search for it using 'search in table 1 d' and the index number that results allows you to index the data in the other column. If the values may change, so it is probably better to load a table control with your equivalent values from a file.

    S...

  • Compare two tables with Look up table

    Hi all

    I basically, I have 3 tables T1, T2 and T3 (Look up table)


    T1

    Col11 Col12

    AA 888
    AA 444
    BB 666
    BB 447
    BB 478
    BB 999


    T2

    Col21 Col22 Col23

    HHH 123 lll
    HHH 123 ppp
    HHH 123 uuu
    GHG 345 kkj
    GHG 345 rer
    uyy 475 hhh


    T3

    Col31 Col32

    AA 123
    AA 345
    AA 564
    BB 564
    BB 475


    I need to know if all the correspondence of values (T3. Col31) Q1. Col11 are in T2. If not what are the missing persons
    I have this table of correspondence T3 to match between T1 T3


    As a data above, I need to get the following out put


    T1. Col11 T3. Col32 T2. Col22 T2. Col23

    AA 123 hhh lll
    AA 123 hhh ppp
    AA 123 hhh uuu
    AA 345 GHG kkj
    AA 345 GHG rer
    AA 564 NULL NULL


    What type of query, I can use to get the result


    See you soon


    Sexy

    Hello
    You just need to use an outer join :)

    SELECT t1.col11,  t3.col32,  t2.col22,  t2.col23
    FROM t1,  t2,  t3
    WHERE t1.col11 = t3.col31
    AND t3.col32 = t2.col21 (+)
    
  • Why use the collections?

    Please help me to better understand and to right the next point

    to move from a PPT available in internet, I read a sentence under the heading "Why use collections?" Please find here

    Use of complex data sets information to host non-PL/SQL environments using table functions

    I think I understand: it means that complex data sets can be collected from oracle using only a single sql statement by using the installation, called Oracle Pipelined Table functions. http://www.akadia.com/services/ora_pipe_functions.html]

    Is any other installation in oracle to the serveup of complex datasets of the information to the host non-PL/SQL environments?

    Published by: o Manjusha Muraleedas, error corrected spelling.

    I watched the presentation and here's how I read it (although you might be better to ask the author):

    Manjusha Muraleedas wrote:
    My question is, why the statement "Serve up complex data sets of information to host non-PL/SQL environments using table functions" came under the title "Why use collections?". Just because there's an installation? or any other really good news?

    There is a hypothesis that is unwritten in the presentation: "complex" data is data that must be handled in PL/SQL, because only SQL does not work.

    Nowhere the author says that a pure SQL solution should be changed into a solution of PL/SQL.

    Once you decide that you must use the PL/SQL, you might want to put your data in collections in scalar variables.

    I understand, complex data, works of art (suppose a structure with 3 columns of tables joing 5) can be meet non-pl/sql envirormment like Java, the use of the ref Cursor or xml. Collection using to do the same thing, this is not a good option.

    Again, I think that the author uses "complex" as a shortcut for 'need to PL/SQL in the first place'. If the data must be processed in PL/SQL, there is no need to use PL/SQL scalar variables or collections.
    I would say "use of the ref Cursor. Providing relational data in format XML should be the exception, not the rule. It has a cost of additional performance.

    Now lets talk about pipeline table functions.
    ...
    functions table pipeline reached the performance of parallel processing. so even if binding commodity of time and memory is there, it will be performs better than refcursors or xml?

    Pipeline table functions perform no better than the ref Cursor. There are two processes running, one to SELECT and the other for the function, there will be more work on the server. With a ref cursor, there is a fair process to return the data.

    Parallel processing is not a problem. If you can make it work in plain SQL, you can do in parallel in SQL simple.

    Published by: Ashton stew on January 22, 2013 16:44

  • Why things look better in PDF format before converting to the JPEG/PNG/TIFF format

    He always intrigues my why it looks better in a pdf preview and then when I choose to convert it into Indesign or Adobe Acrobat it immediately loses quality/hues turn gray.

    I have had several success screenshotting things and turning them manually and sticking them in a document in fireworks and then saving it as image format.

    Is there a better way to convert without using this method? Plug-ins may or explanations on how to stop this?

    Thank you

    Daniel K.

    This is not the appropriate forum, but let's see if we can see what you are doing and why. An overview of the pdf should not look better than exporting InDesign to PDF. This may depend on your settings file that determines the quality of your export to PDF.

    Whenever you convert Acrobat or InDesign to JPEG, PNG, or TIFF, you are likely to loose quality. This is particularly true for the JPEG as it is a lossy format (it's supposed to lose quality in order to ensure a smaller file size). Conversion of InDesign or Acrobat in JPEG, PNG or TIFF format involves a change in a format that includes the actual fonts and possibly other vector information (including quality is beyond resolution because it is derived from mathematical formulas describing the content) to form a frame (jpg, png, tiff) which is only based on the creation of points at a certain resolution to create an image. When the resolution of the image file is different from the compromise resolution look a way are made. It is the loss you see.

    Why do you need to convert raster images InDesign documents?

  • Timestamp of reading using the external Table

    Hello
    I have a data file that looks like
    2011-08-15 00:00:00.000000 | 23:59:59.999999 2011-08-15

    I am trying to use an external table. But I always get an error trying to read the fractional part (ie the last 6 digits).
    The code is:
    create table ext_table_fdw)
    DW_Open TIMESTAMP
    DW_Close TIMESTAMP
    )
    (external) Organization
    type oracle_loader
    the default directory ftp_in
    (settings) access
    records delimited by newline
    nologfile
    fields ended by ' |'
    missing field values are null
    (
    DW_OPEN Char Date_Format Timestamp mask 'Mon dd yyyy Hh:Mi:Ss:Ff6'
    DW_Close Char Date_Format Timestamp mask 'Mon dd yyyy Hh:Mi:Ss:Ff6'
    )
    )
    location ("fdwextract_copy.txt")
    )
    reject limit unlimited;

    I get this error:
    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-29400: data cartridge error
    Error opening file /u02/lpremia/ftp-in/EXT_TABLE_FDW_11948.bad

    Please help as it is very important for us to be able to read the last part of the timestamp.
    Thank you.
    Best regards
    Brinda

    user6361157 wrote:
    Hello
    I have a data file that looks like
    2011-08-15 00:00:00.000000 | 23:59:59.999999 2011-08-15
    DW_OPEN Char Date_Format Timestamp mask 'Mon dd yyyy Hh:Mi:Ss:Ff6'
    DW_Close Char Date_Format Timestamp mask 'Mon dd yyyy Hh:Mi:Ss:Ff6'

    The MASK is NOT March data!
    'YYYY-MM-DD HH24:MI:SS:Ff6 ".

  • Different codes for different - looking of table (but the same memory-wise)

    (I've posted something similar here as well, but it's kind of emergency):
    http://www.Java-forums.org/advanced-Java/40756-HashMap-treating-isomorphic-but-different-objects-same-key.html)

    Hi all

    I am trying to program the Reversi game on my computer and I represent the game like a lookup table tree using a hash table.
    Any available to the Commission is represented as an int. [8] [8]. The hash table takes a configuration of the Board of Directors as a key, and is meant to restore an object that contains information about the possible move.

    But I have a problem. Suppose I have a Council (4 x 4 for readability):

    Code:
    Board of Directors of int [] [] = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}};

    And suppose that it gives a hash code of say "1607178090".

    Then, when I change the Council;
    Board = {{0,0,0,0}, {0,0,0,0}, {1,1,1,1}, {1,1,1,1}};
    I want the hash to be different code, then my hashMap will recognize it as a different Board.


    ---

    I tried to make a Matrix object and dominant equals and hashCode, but I'm not sure what to change. The Java API says that the hash code for the tables is based on the content, even if the following code renders the same code to hash twice. I don't really understand this:
    int [] a1 = {0,1,2};
    System.out.println (a1.getHash ());
    A1 [0] = 1;
    System.out.println (a1.getHash ());




    Moreover, my Matrix class is:
    to import java.util.Arrays;

    public class {Matrix
    public int [] [] Council;
    public matrix()) {}
    }

    {public matrix (int [] [] b)
    Board = b;
    }

    @Override
    public int hashCode() {}
    first final int = 31;
    int result = 1;
    System.out.println ("based hash code calculation on :"); ")
    first = result * result + Arrays.hashCode (board);
    for (int c = 0; c < board.length; c ++) {}
    for (int r = 0; r < board.length; r ++) {}
    System.out.Print(""+Board[c][r]+"");
    }
    System.out.println ();
    }
    System.out.println ("return" + result);
    return the result;
    }

    @Override
    public boolean equals (Object obj) {}
    If (this is obj)
    Returns true;
    If (obj is nothing)
    Returns false;
    If (getClass()! = obj.getClass ())
    Returns false;
    Matrix other obj = (matrix);
    If (!.) Arrays.Equals (Council, other.board))
    Returns false;
    Returns true;
    }
    }

    Published by: 845707 on 19 / mrt / 2011 02:20

    845707 wrote:
    I don't really understand this:
    int [] a1 = {0,1,2};
    System.out.println (a1.getHash ());
    A1 [0] = 1;
    System.out.println (a1.getHash ());

    Me neither does table have a method called "getHash();" these days?
    In case you meant hashCode(), what you call it is hashCode() of the object, which would remain the same for the object during its lifetime.

    In your example code you use correctly Arrays.hashCode (), then why did you write an example that does not represent your actual code?

  • Why use Top Link is the best in the DB adapter?

    Hi all
    The one you suggest, why use Top Link (Build-in Insert, operation Select etc.) is the best in the DB adapter using the custom query above?

    Thank you

    Hi Michel,.

    to insert / select, it depends on what kind of user you are. TopLink allows you to browse and click on tables and have everything generated for you. If you're a DBA or show me the SQL type then you can simply type SQL directly.

    Some benefits of TopLink would be:

    -The range of SQL generated by TopLink is limited, but if you hard code SQL complex in your service you need to keep it.

    TopLink - can generate when executing the correct SQL for a database, to tell DB2 to Oracle easy.

    -L' merge operation will compare the XML of the columns on the data entry and update only what has changed. It can also make a sparse merger. If only have been 4 columns in the XML file, only 4 columns in the database will be updated.

    -For the incoming interrogation strategy (LogicalDelete, table of sequencing, etc.) is a configuration property and then at run time, several SQL statements are generated. Also leverages the SQL syntax advanced like the Oracle only for UPDATE SKIP LOCKED, he wrote everything yourself can be tedious and error-prone.

    -The main advantage of TopLink is when you go beyond the thinking on one table. If you import more than one table at the same time, TopLink will generate SQL code to select maintain several tables, set the validation and generate a hierarchical XSD. With custom SQL the corresponding XSD is always flat. That is, if you just need to insert a PGE that you could get away with custom SQL. If you need to insert a dept and EMP, I'd use TopLink.

    -C' when the intermediate abstraction of an object/array is also more logical, because you only need to import a schema relationship complex once, then generate inserts, selects, etc.

    So I hope this helps. They are each just as viable and can do something that the other cannot. Where you see an overlap I would go with your personal preference.

    Thank you

    Steve

  • Site search using several database tables

    I am able to search my site for certain keywords using a single database table for example I can search for the butterflies using butterflies search table list. However I would like to have a global search for all types of wild animals on my ex of site from visitors to the homepage can search all species with the word Green in the name. If the search function needs to look at a range of tables, for example floralist; fungilist etc. I have problems with the sort code - I'm a bio-scientist a programmer so any suggestions would be appreciated.

    Here is my code for the search using a single table:

      <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    $colname_search11 = "-1";
    if (isset($_POST['species'])) {
      $colname_search11 = $_POST['species'];
    }
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_search11 = sprintf("SELECT * FROM `moths searchl ist` WHERE species LIKE %s", GetSQLValueString("%" . $colname_search11 . "%", "text"));
    $search11 = mysql_query($query_search11, $cjwebsite) or die(mysql_error());
    $row_search11 = mysql_fetch_assoc($search11);
    $totalRows_search11 = mysql_num_rows($search11);
    ?>
    


    followed by:

    <div class="results">
          <?php do { ?>
            <ul>
              <li><a href="Insects/Moths/species.php?id=<?php echo $row_search11['id']; ?>"><?php echo $row_search11['species']; ?></a></li>
            </ul>
            <?php } while ($row_search11 = mysql_fetch_assoc($search11)); ?>
          </ul>
    


    My address is www.hebridensis.co.uk

    Thank you

    Christine

    Hi Chris,

    If the fields are basically the same for all the tables, seems, it would be better to merge them into a single table of "wildlife" and add a field "category", in this way you only ever have to query this table even if several categories are added, each record would have a unique id, and you could open up opportunities to do research with no dependents drop-down menus (i.e. a drop down menu allows the user to select) a category and then will fill up with the category-based species).

    It wouldn't be too hard to create the new table, but I wonder how many other elements of your site could be affected by the change.

    Hope this helps,

    Greg

  • How to make a magnifying glass link to a look up table?

    Dear friends,

    Hello. I develop the application of accounting journal entry. Journal line, I use the image "magnifying glass" next to each field in the table. When you click on the magnifying glass, it is supposed to come a look up table (a graph and a table of name mapping), and we choose the appropriate chart to enter the field of the table.

    I understand to create another page for the look up table and record. But I do not understand how to make a magnifying glass link to a look up table. Can someone tell me how to do this? Thank you.


    Lucy

    This is how it works,
    Table A (which stores the fields of graph). You used A table fields on a page so that users can enter data.
    You do not need to put a magnifying glass image or create a new page to achieve the look to the top of the page.

    all you need to do is create another table say table B, which should have the graphic field and the description to display on the search page. Then open folder field property field chart table A and table B as quick picture to mention.

  • Why cannot create the table partitioned successfully?

    Why cannot create the table partitioned successfully?
    SQL> create table hr.gps_log_his
    (id number,
    name varchar2(10),
    time date)
    tablespace ts_log_his
    PARTITION BY RANGE (TIME)
    (PARTITION udp_part09110707 VALUES LESS THAN (TO_DATE('09110708','yymmddhh24')),
    PARTITION udp_part09110708 VALUES LESS THAN (TO_DATE('09110709','yymmddhh24')),
    PARTITION udp_part09110709 VALUES LESS THAN (TO_DATE('09110710','yymmddhh24')),
    PARTITION udp_part09110710 VALUES LESS THAN (maxvalue)
    );
    
    (PARTITION udp_part09110707 VALUES LESS THAN (TO_DATE('09110708','yymmddhh24')),
    Error on line 7: 
    ORA-14120: DATE columns did not specify the complete partitioning limits.

    The detailed error message is as follows:

    ORA-14120: incompletely specified partition bound for a DATE column
    
    Cause: An attempt was made to use a date expression whose format does not fully
    (i.e. day, month, and year (including century)) specify a date as a partition bound
    for a DATE column. The format may have been specified explicitly (using TO_DATE()
    function) or implicitly (NLS_DATE_FORMAT).
    
    Action: Ensure that date format used in a partition bound for a DATE column supports
    complete specification of a date (i.e. day, month, and year (including century)). If
    NLS_DATE_FORMAT does not support complete (i.e. including the century) specification
    of the year, use TO_DATE() (e.g. TO_DATE('01-01-1999', 'MM-DD-YYYY') to fully
    express the desired date. 
    

    Action: Change to_date('09110708','yymmddhh24') to
    to_date('2009110708','yyyymmddhh24')

  • How to find modules using a specific table in the designer 10 g?

    Hi, we are in a conversion traject of Designer 6.0 to Designer 10 g with patches 10.1.2.5 group.
    Apart from a conversion problem for which we got a work around (see bug number 8453702) everything looks okay now.
    But with the trial run, I found something strange:
    -in Des10g, when you look at the uses of a table, you do not see the part "Used in the Module components" more. It's pretty boring. Now, I found a way to show something with the help of the matrix diagrammer, but I'm not very happy with it.
    My questions:
    -How is it changed? and
    There has another way to quickly view these uses, or are we stuck with it?

    Best regards, Paul.

    Hello
    Move the repository object browser. Go to table definitions--> uses--> used in sets of sql queries
    Best regards Erik

  • Why use the symbol {} in the following script?

    Why use the symbol * {} * in the following script?
    < reading-writing-support-map-plan >
    < scheme name > SampleDatabaseScheme < / system-name >
    < internal-cache-system >
    < local plan >
    < system-Ref > SampleMemoryScheme < / plan-ref >
    < / local plan >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.tangosol.examples.coherence.DBCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    * < {cache name} param-value > < / param-value > *.
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < / reading-writing-support-map-plan >


    Thank you very much

    Published by: jetq on June 24, 2009 18:26

    Hi Frank,.

    In the example, the '{cache-name}' is supposed to be replaced by a table name or view of data that is queried for the cached data. Its purpose is show how to pass parameters to the constructor of class.

    Kind regards

    Harv

Maybe you are looking for

  • I get "error: TypeError: boxOverlay_AVG is null." What is going on?

    Whenever I connect to the internet (Google) a pop [JavaScript Application] box indicating "error: TypeError: boxOverlay_AVG is null. Don't know what's going on? I note that I cannot print some pages of websites.

  • The IX2 SMART state - what should I expect?

    Hello On the CHIP, I read on using the http management should display a status. That's all I got so far: Is there another page I'm missing? Should I have a more readable smart to IX2 status? Another question, are these WD Green HDDs original IX2? (th

  • camera to the iMac does not work, you must start

    Got an iMac 27 inches by the end of 2012. Lately the built-in camera will stop working. If I restart it, it works fine. And it continues to work properly. I think that something is happening when he sleeps all night, or for a long time during the day

  • How to create a PDF from a scanner MX7600 point 8.1 Windows

    I just changed to a new desktop PC running Windows 8.1. I downloaded the drivers from the Canon for Windows website 8.1, and I can't find the function to create a PDF file of the scanned document, as I could in Windows 7. How can I created a PDF file

  • I had a laptop with wifi. Now, I have wireless at all the

    I had a laptop with wifi on it. I had a problem with the windows mediacenter edition that was on it. I formatted the hard drive and installed Windows XP pro. now, I have wireless at all. is there anything I can do to recover my wifi (wireless)? can s