SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28
  1. #26
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Heh, I guess it is an abstraction too far.

    Why not model your entire database with 2 tables - 'tables' & 'fields' Any application only needs 2 tables from now on :P

  2. #27
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    don't go there
    I thought not

    In the end it would involve more data, because a column is used for the table.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #28
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    To the one who said they hadn't seen this in commercial apps before: I have. A lot. It's been a while since I dabbled in dba work, but I believe it was called a "pivot" table. Typically, we'd have one table to join the pk's of two other tables.

    To the one who asked about using one table for all: that's be a huge table over time. You'll want to keep read time minimal. However...

    relationships
    ---------------
    left_table_name
    left_table_pk
    right_table_name
    right_table_pk
    * set a compound unique key on all four so the same mapping can't happen more than once.

    ^I wouldn't recommend this though due to the read times I mention if the table grew to large.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •