Details

    • Type: Task
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • old issue number:
      19

      Description

      Unlike with standard relational databases, HBase allows you the flexibility of dynamically creating as many key values in a row as you'd like. Phoenix could leverage this by providing a way to model child rows inside of a parent row. The child row would be comprised of the set of key values whose column qualifier is prefixed with a known name and appended with the primary key of the child row. Phoenix could hide all this complexity, and allow querying over the nested children through joining to the parent row.

        Activity

        Hide
        jleech Jonathan Leech added a comment -

        It would be equally valuable to be able to define secondary indexes in this nested fashion; e.g. a single hybrid secondary index across multiple tables to answer the join efficiently.
        The above + function based indexes would enable interesting data warehousing / BI. I just watched Josh Willis' presentation on what he called "supernova schemas" and this could enable that within Phoenix defined all in SQL.
        Also could do some interesting things with hooks into replication in addition to / instead of coprocessors.

        Show
        jleech Jonathan Leech added a comment - It would be equally valuable to be able to define secondary indexes in this nested fashion; e.g. a single hybrid secondary index across multiple tables to answer the join efficiently. The above + function based indexes would enable interesting data warehousing / BI. I just watched Josh Willis' presentation on what he called "supernova schemas" and this could enable that within Phoenix defined all in SQL. Also could do some interesting things with hooks into replication in addition to / instead of coprocessors.
        Hide
        alexdl alex kamil added a comment -
        Show
        alexdl alex kamil added a comment - related: PHOENIX-477 , PHOENIX-370
        Hide
        lhofhansl Lars Hofhansl added a comment -

        Another way of looking at this is to even provide proximity between the parent and child rows.

        In HBase that can be done easily by having the child row key be prefixed with the parent's row key.
        Then all children pertaining to a particular parent row would sort together with the parent right after it.
        That is a very easy and natural way to model master-detail type relationship. It can obviously only be used to model one-to-many relationships.

        I.e. say parent has a PK of X,Y. Then the child table would have a PK of X,Y,Z. One could then even define an HBase split policy that does not split inside of the X,Y portion and then have MVCC transactions between all children of the same parent (and including the parent).

        The only downside would be scanning only rows in the parent table, which now would have to skip all rows of the children.

        Show
        lhofhansl Lars Hofhansl added a comment - Another way of looking at this is to even provide proximity between the parent and child rows. In HBase that can be done easily by having the child row key be prefixed with the parent's row key. Then all children pertaining to a particular parent row would sort together with the parent right after it. That is a very easy and natural way to model master-detail type relationship. It can obviously only be used to model one-to-many relationships. I.e. say parent has a PK of X,Y. Then the child table would have a PK of X,Y,Z. One could then even define an HBase split policy that does not split inside of the X,Y portion and then have MVCC transactions between all children of the same parent (and including the parent). The only downside would be scanning only rows in the parent table, which now would have to skip all rows of the children.
        Hide
        pctony Tony Stevenson added a comment -

        Comment:anoopsamjohn:12/20/13 04:54:36 PM:

        assigned

        Show
        pctony Tony Stevenson added a comment - Comment:anoopsamjohn:12/20/13 04:54:36 PM: assigned

          People

          • Assignee:
            Unassigned
            Reporter:
            jamestaylor James Taylor
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development