SlideShare a Scribd company logo
1 of 57
SciQL
A Query Language for Science
        Applications


    M. Kersten, Y. Zhang, M. Ivanova, N. Nes
                CWI Amsterdam

          Array Database Workshop
              March 25th, 2011
Who needs arrays anyway?

             Seismology             – 1-D time-series, 3-D spatial data

             Astronomy              – temporal ordered rasters

             Climate simulation     – temporal ordered grid

             Remote sensing         – images of 2-D or higher

             Genomics               – ordered DNA strings


             Scientists love arrays:
                   HDF5, NETCDF, FITS, MSEED, …
             but also use:
                   lists, tables, XML, ...


2011-03-25                        Array Database workshop                 2
Arrays In DBMS

             Research issues already in the 80’s

             SQL language extension (add notion of order):

                RasQL, AQuery, SRQL, ...

             SQL:1999, SQL:2003

                collection type, C-style arrays

             Algebraic frameworks

                (S)RAM, AQL, AML, ...




2011-03-25                        Array Database workshop                3
Arrays In DBMS
             DBMS support

                OODB, multi-dimensional DBMS, Sequence DBMS, ...

                the Longhorn Array Database

             RasDaMan
                Array in chunks as BLOB

                Array query optimisation on top of DBMS

                Known to work up to 12 TBs!

             PostgreSQL 8.1

             SciDB

                Array DBMS from scratch

                Overlapping chunks for parallel execution


2011-03-25                         Array Database workshop                4
What is the problem with RDBMS?

             Appropriate array denotations?

             Functional complete operation set?



             Size limitations due to (BLOB) representations?

             Existing foreign files?

             Scale?

             ...




2011-03-25                     Array Database workshop         5
SciQL

             An extension of SQL:2003 (pronounced as ‘cycle’)



             Array as first class citizens of DBMS

             Seamless integration of tables and arrays

             Named dimensions with constraints

             Flexible structure-based grouping



             Seismology use case


2011-03-25                    Array Database workshop               6
Array Definitions
                                      Fixed array
                                                                 y                 null
             CREATE ARRAY A1 (                               3       0.0     0.0          0.0   0.0
                x INT DIMENSION[0:4:1],                      2       0.0     0.0          0.0   0.0
                y INT DIMENSION[0:4:1],               null                                            null
                                                             1       0.0     0.0          0.0   0.0
                v FLOAT DEFAULT 0.0
             );                                              0       0.0     0.0          0.0   0.0
                                                                                                      x
                                                                      0       1            2     3
                                                                                   null




2011-03-25                                Array Database workshop                                            7
Array Definitions
                                      Fixed array
                                                                 y                 null
             CREATE ARRAY A1 (                               3       0.0     0.0          0.0   0.0
                x INT DIMENSION[0:4:1],                      2       0.0     0.0          0.0   0.0
                y INT DIMENSION[0:4:1],               null                                            null
                                                             1       0.0     0.0          0.0   0.0
                v FLOAT DEFAULT 0.0
             );                                              0       0.0     0.0          0.0   0.0
                                                                                                      x
                                                                      0       1            2     3
                                                                                   null



                                Unbounded array
                                                                 y
             CREATE ARRAY A2 (                               3
                x INT DIMENSION,                             2
                y INT DIMENSION,                                                   null
                                                             1
                v FLOAT DEFAULT 0.0
                                                             0
             );
                                                                                                      x
                                                                      0       1            2     3




2011-03-25                                Array Database workshop                                            7
Array Definitions
                                           Fixed array
                                                                    y                     null
             CREATE ARRAY A1 (                                  3       0.0         0.0          0.0      0.0
                x INT DIMENSION[0:4:1],                         2       0.0         0.0          0.0      0.0
                y INT DIMENSION[0:4:1],                  null                                                     null
                                                                1       0.0         0.0          0.0      0.0
                v FLOAT DEFAULT 0.0
             );                                                 0       0.0         0.0          0.0      0.0
                                                                                                                  x
                                                                         0           1            2           3
                                                                                          null



                                    Unbounded array
                                                                    y
             CREATE ARRAY A2 (                                  3
                x INT DIMENSION,                                2
                y INT DIMENSION,                                                          null
                                                                1
                v FLOAT DEFAULT 0.0
                                                                0
             );
                                                                                                                  x
                                                                         0           1            2           3


                                                                    y

                                                                3                         null

             INSERT INTO A2 VALUES                              2                   0.0          4.5
               (1,0,5.5), (1,1,0.4), (2,2,4.5);                 1            null   0.4          0.0   null
                                                                0                   5.5          0.0
                                                                                                                  x
                                                                         0           1            2           3
                                                                                          null

2011-03-25                                   Array Database workshop                                                     7
Array Definitions
                                           Fixed array
                                                                    y                     null
             CREATE ARRAY A1 (                                  3       0.0         0.0          0.0        0.0
                x INT DIMENSION[0:4:1],                         2       0.0         0.0          0.0        0.0
                y INT DIMENSION[0:4:1],                  null                                                       null
                                                                1       0.0         0.0          0.0        0.0
                v FLOAT DEFAULT 0.0
             );                                                 0       0.0         0.0          0.0        0.0
                                                                                                                    x
                                                                         0           1            2             3
                                                                                          null



                                    Unbounded array
                                                                    y
             CREATE ARRAY A2 (                                  3
                x INT DIMENSION,                                2
                y INT DIMENSION,                                                          null
                                                                1
                v FLOAT DEFAULT 0.0
                                                                0
             );
                                                                                                                 x
                                                                         0           1            2    implicit size
                                                                                                            3


                                                                    y

                                                                3                         null

             INSERT INTO A2 VALUES                              2                   0.0          4.5
               (1,0,5.5), (1,1,0.4), (2,2,4.5);                 1            null   0.4          0.0     null
                                                                0                   5.5          0.0
                                                                                                                    x
                                                                         0           1            2             3
                                                                                          null

2011-03-25                                   Array Database workshop                                                       7
Array Dimensions
         CREATE ARRAY A1 (             CREATE ARRAY A2 (
            x INT DIMENSION[0:4:1],       x INT DIMENSION,
            y INT DIMENSION[0:4:1],       y INT DIMENSION,
            v FLOAT DEFAULT 0.0           v FLOAT DEFAULT 0.0
         );                            );



             Fixed dimensions: [start:final:step]
             INT dimension: [size]
             Unbounded dimensions: [(start|∗) : (final|∗) : (step|∗)]
             Dimension data type: scalar data types
             Time series:
             CREATE ARRAY Experiment (
              time TIMESTAMP DIMENSION [TIMESTAMP ‘2011-03-25’ : * :
                INTERVAL ‘1’ MINUTE],
              data FLOAT );




2011-03-25                            Array Database workshop                  8
Array versus Table
     CREATE ARRAY A1 (                              CREATE TABLE T1 (
        x INT DIMENSION[0:4:1],                        x INT,
        y INT DIMENSION[0:4:1],                        y INT, PRIMARY KEY (x,y),
        v FLOAT DEFAULT 0.0                            v FLOAT DEFAULT 0.0
     );                                             );

     SELECT * FROM A1;                              SELECT * FROM T1;
         x       y        v                            x        y        v
         0       0       0.0
         0       1       0.0
         0       2       0.0
         0       3       0.0
         1       0       0.0
         1       1       0.0
         1       2       0.0
         1       3       0.0
         2       0       0.0
         2       1       0.0
         2       2       0.0
         2       3       0.0
         3       0       0.0
         3       1       0.0
         3       2       0.0
         3       3       0.0

2011-03-25                        Array Database workshop                          9
Array versus Table
     CREATE ARRAY A1 (                              CREATE TABLE T1 (
        x INT DIMENSION[0:4:1],                        x INT,
        y INT DIMENSION[0:4:1],                        y INT, PRIMARY KEY (x,y),
        v FLOAT DEFAULT 0.0                            v FLOAT DEFAULT 0.0
     );                                             );

     SELECT * FROM A1;                              SELECT * FROM T1;
         x       y        v                            x        y        v
         0       0       0.0
         0       1       0.0
         0       2       0.0
         0       3       0.0
         1       0       0.0
         1       1       0.0
         1       2       0.0
         1       3       0.0
         2       0       0.0
         2       1       0.0
         2       2       0.0
         2       3       0.0
         3       0       0.0
         3       1       0.0
         3       2       0.0
         3       3       0.0

2011-03-25                        Array Database workshop                          9
Array versus Table
     CREATE ARRAY A1 (                                 CREATE TABLE T1 (
        x INT DIMENSION[0:4:1],                           x INT,
        y INT DIMENSION[0:4:1],                           y INT, PRIMARY KEY (x,y),
        v FLOAT DEFAULT 0.0                               v FLOAT DEFAULT 0.0
     );                                                );




      A collection of a priori defined tuples           A collection of tuples

      To be updated with INSERT/DELETE                  Explicitly create/remove with INSERT/
        (and UPDATE)                                      DELETE

      Indexed by dimension expressions                  Indexed by a (primary) key

      Default value for non-dimensional                 Default value for each column
        attributes (i.e., cells)




2011-03-25                           Array Database workshop                               10
Array & Table Coercions
  CREATE ARRAY A1 (                                       SELECT x, y, v FROM A1;
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],                                  x          y    v
     v FLOAT DEFAULT 0.0                                      0          0   0.0
  );                                                          0          1   0.0
            y               null
                                                              0          2   0.0
        3       0.0   0.0          0.0   0.0                  0          3   0.0
 null
        2       0.0   0.0          0.0   0.0
                                                 null
                                                              1          0   0.0
        1       0.0   0.0          0.0   0.0
                                                              1          1   0.0
        0       0.0   0.0          0.0   0.0
                 0     1            2     3
                                                x             1          2   0.0
                            null
                                                              1          3   0.0
                                                              2          0   0.0
                                                              2          1   0.0
                                                              2          2   0.0
                                                              2          3   0.0
                                                              3          0   0.0
                                                              3          1   0.0
                                                              3          2   0.0
                                                              3          3   0.0

2011-03-25                                     Array Database workshop              11
Array & Table Coercions
  CREATE ARRAY A1 (                                       SELECT x, y, v FROM A1;
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],                                  x          y    v
     v FLOAT DEFAULT 0.0                                      0          0   0.0
  );                                                          0          1   0.0
            y               null
                                                              0          2   0.0
        3       0.0   0.0          0.0   0.0                  0          3   0.0
 null
        2       0.0   0.0          0.0   0.0
                                                 null
                                                              1          0   0.0
        1       0.0   0.0          0.0   0.0
                                                              1          1   0.0
        0       0.0   0.0          0.0   0.0
                 0     1            2     3
                                                x             1          2   0.0
                            null
                                                              1          3   0.0
                                                              2          0   0.0
                                                              2          1   0.0
                                                              2          2   0.0
                                                              2          3   0.0
                                                              3          0   0.0
                            full materialisation!             3          1   0.0
                                                              3          2   0.0
                                                              3          3   0.0

2011-03-25                                     Array Database workshop              11
Array & Table Coercions
  CREATE TABLE T2 (
     x INT, y INT, v FLOAT
  );

  INSERT INTO T2 VALUES
    (1,0,5.5), (1,1,0.4),
       (2,2,4.5), (1,1,1.3);

      x        y        v
      1        0       5.5
      1        1       0.4
      2        2       4.5
      1        1       1.3




2011-03-25                     Array Database workshop     12
Array & Table Coercions
  CREATE TABLE T2 (
     x INT, y INT, v FLOAT
  );

  INSERT INTO T2 VALUES              SELECT [x], [y], v FROM T2;
    (1,0,5.5), (1,1,0.4),
       (2,2,4.5), (1,1,1.3);
                                          y
      x        y        v
                                      3                          0.0
      1        0       5.5
                                      2                    0.0         4.5
      1        1       0.4
                                      1              0.0   0.4         0.0   0.0
      2        2       4.5
                                      0                    5.5         0.0
      1        1       1.3                                                             x
                                                 0          1           2          3
                                                                 0.0

                                              An unbounded array
                                              min/max of dimensions are derived from the
                                              minimal bounding rectangle
                                              non-dimentional attributes inherit default
                                              column values
                                              duplicates are overwritten

2011-03-25                     Array Database workshop                                     12
Array Modifications
  CREATE ARRAY A1 (
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
                          DELETE FROM A1 WHERE x = 1;

                                 y               null
                             3       0.0   null         0.0    0.0
                             2       0.0   null         0.0    0.0
                      null                                           null
                             1       0.0   null         0.0    0.0
                             0       0.0   null         0.0    0.0
                                      0      1           2      3
                                                                     x
                                                 null




2011-03-25                           Array Database workshop                  13
Array Modifications
  CREATE ARRAY A1 (
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
                          DELETE FROM A1 WHERE x = 1;

                                 y               null
                             3       0.0   null         0.0      0.0
                             2       0.0   null         0.0      0.0
                      null                                              null
                             1       0.0   null         0.0      0.0
                             0       0.0   null         0.0      0.0
                                      0      1           2        3
                                                                       x
                                                 null
                                                              creates holes in
                                                                 the array




2011-03-25                           Array Database workshop                     13
Array Modifications
  CREATE ARRAY A1 (
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
                 INSERT INTO A1 VALUES (1,1,0.5), (2,1,0.5), (3,1,0.5);

                                    y                null
                                3       0.0   null          0.0    0.0
                                2       0.0   null          0.0    0.0
                         null                                            null
                                1       0.0    0.5          0.5    0.5
                                0       0.0   null          0.0    0.0
                                         0      1            2      3
                                                                         x
                                                     null




2011-03-25                              Array Database workshop                   14
Array Modifications
  CREATE ARRAY A1 (
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
                 INSERT INTO A1 VALUES (1,1,0.5), (2,1,0.5), (3,1,0.5);

                                    y                null
                                3       0.0   null          0.0      0.0
                                2       0.0   null          0.0      0.0
                         null                                              null
                                1       0.0    0.5          0.5      0.5
                                0       0.0   null          0.0      0.0
                                         0      1            2        3
                                                                           x
                                                     null
                                                                   set (change)
                                                                  values of cells




2011-03-25                              Array Database workshop                     14
Array Views
  CREATE ARRAY A1 (
     x INT DIMENSION[0:4:1],
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT -1.0
  );

  INSERT INTO A1 VALUES
    (1,1,0.5), (2,1,0.5), (3,1,0.5);



           y                    null
       3       -1.0 -1.0 -1.0 -1.0
       2       -1.0 -1.0 -1.0 -1.0
null                                    null
       1       -1.0 0.5    0.5    0.5
       0       -1.0 -1.0 -1.0 -1.0
                0    1      2      3
                                        x
                         null



2011-03-25                                     Array Database workshop            15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;



           y                    null
       3       -1.0 -1.0 -1.0 -1.0
       2       -1.0 -1.0 -1.0 -1.0
null                                    null
       1       -1.0 0.5    0.5    0.5
       0       -1.0 -1.0 -1.0 -1.0
                0    1      2      3
                                        x
                         null



2011-03-25                                     Array Database workshop                     15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;



           y                    null
       3       -1.0 -1.0 -1.0 -1.0
       2       -1.0 -1.0 -1.0 -1.0
null                                    null
       1       -1.0 0.5    0.5    0.5
       0       -1.0 -1.0 -1.0 -1.0
                0    1      2      3
                                        x
                         null



2011-03-25                                     Array Database workshop                     15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;



           y                    null
       3       -1.0 -1.0 -1.0 -1.0
       2       -1.0 -1.0 -1.0 -1.0
null                                    null
       1       -1.0 0.5    0.5    0.5
       0       -1.0 -1.0 -1.0 -1.0
                0    1      2      3
                                        x
                         null



2011-03-25                                     Array Database workshop                     15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;

                                                             y                    null
           y                    null                     4       0.0   0.0   0.0    0.0   0.0   0.0
       3       -1.0 -1.0 -1.0 -1.0                       3       0.0   0.0   0.0    0.0   0.0   0.0
       2       -1.0 -1.0 -1.0 -1.0                       2       0.0   0.0   0.0    0.0   0.0   0.0
null                                    null      null                                                null
       1       -1.0 0.5    0.5    0.5                    1       0.0   0.0   0.0    0.0   0.0   0.0
       0       -1.0 -1.0 -1.0 -1.0                       0       0.0   0.0   0.0    0.0   0.0   0.0
                0    1      2      3
                                        x
                                                         -1      0.0   0.0   0.0    0.0   0.0   0.0
                         null                                    -1     0     1      2     3     4
                                                                                                      x
                                                                                  null

2011-03-25                                     Array Database workshop                                       15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;

                                                             y                    null
           y                    null                     4       0.0   0.0   0.0    0.0   0.0   0.0
       3       -1.0 -1.0 -1.0 -1.0                       3       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0               0.0
       2       -1.0 -1.0 -1.0 -1.0                       2       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0               0.0
null                                    null      null                                                null
       1       -1.0 0.5    0.5    0.5                    1       0.0   0.5
                                                                       0.0   0.5
                                                                             0.0    0.5
                                                                                    0.0   0.0   0.0
       0       -1.0 -1.0 -1.0 -1.0                       0       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0               0.0
                0    1      2      3
                                        x
                                                         -1      0.0   0.0   0.0    0.0   0.0   0.0
                         null                                    -1     0     1      2     3     4
                                                                                                      x
                                                                                  null

2011-03-25                                     Array Database workshop                                       15
Array Views
  CREATE ARRAY A1 (                                CREATE ARRAY VIEW A2 (
     x INT DIMENSION[0:4:1],                         x INT DIMENSION [-1:5:1],
     y INT DIMENSION[0:4:1],                         y INT DIMENSION [-1:5:1],
     v FLOAT DEFAULT -1.0                            w FLOAT DEFAULT 0.0
  );                                               ) AS
                                                   SELECT x-1, y, v FROM A1 WHERE x > 1
  INSERT INTO A1 VALUES                            UNION
    (1,1,0.5), (2,1,0.5), (3,1,0.5);               SELECT x, y, 1.0 FROM A1 WHERE x = 3;

                                                             y                    null
           y                    null                     4       0.0   0.0   0.0    0.0   0.0   0.0
       3       -1.0 -1.0 -1.0 -1.0                       3       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0 1.0           0.0
       2       -1.0 -1.0 -1.0 -1.0                       2       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0 1.0           0.0
null                                    null      null                                                null
       1       -1.0 0.5    0.5    0.5                    1       0.0   0.5
                                                                       0.0   0.5
                                                                             0.0    0.5
                                                                                    0.0   1.0
                                                                                          0.0   0.0
       0       -1.0 -1.0 -1.0 -1.0                       0       0.0 -1.0 -1.0 -1.0 0.0
                                                                      0.0 0.0 0.0 1.0           0.0
                0    1      2      3
                                        x
                                                         -1      0.0   0.0   0.0    0.0   0.0   0.0
                         null                                    -1     0     1      2     3     4
                                                                                                      x
                                                                                  null

2011-03-25                                     Array Database workshop                                       15
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y              null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0   0.0         0.0   0.0

                                               2       0.0   0.0         0.0   0.0
                                        null                                         null
                                               1       0.0   0.5         0.5   0.5

                                               0       0.0   0.0         0.0   0.0
                                                        0     1           2     3
                                                                                      x
                                                                  null




2011-03-25                              Array Database workshop                                16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5
            tiling
               ≠                               0       0.0    0.0         0.0   0.0
         windowing                                                                     x
                                                        0      1           2     3

                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 16
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y              null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0   0.0         0.0   0.0

                                               2       0.0   0.0         0.0   0.0
                                        null                                         null
                                               1       0.0   0.5         0.5   0.5

                                               0       0.0   0.0         0.0   0.0
                                                        0     1           2     3
                                                                                      x
                                                                  null




2011-03-25                              Array Database workshop                                17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x:x+2][y:y+2];
     y INT DIMENSION[0:4:1],
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 17
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1[1:*][1:*]
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x-1][y], A1[x][y-1],
     y INT DIMENSION[0:4:1],                A1[x][y], A1[x+1][y], A1[x][y+1];
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y              null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0   0.0         0.0   0.0

                                               2       0.0   0.0         0.0   0.0
                                        null                                         null
                                               1       0.0   0.5         0.5   0.5

                                               0       0.0   0.0         0.0   0.0
                                                        0     1           2     3
                                                                                      x
                                                                  null




2011-03-25                              Array Database workshop                                18
Array Tiling
  CREATE ARRAY A1 (                       SELECT [x], [y], AVG(v) FROM A1[1:*][1:*]
     x INT DIMENSION[0:4:1],              GROUP BY DISTINCT A1[x-1][y], A1[x][y-1],
     y INT DIMENSION[0:4:1],                A1[x][y], A1[x+1][y], A1[x][y+1];
     v FLOAT DEFAULT 0.0
  );
  INSERT INTO A1 VALUES                            y               null
     (1,1,0.5), (2,1,0.5), (3,1,0.5);
                                               3       0.0    0.0         0.0   0.0

                                               2       0.0    0.0         0.0   0.0
                                        null                                          null
                                               1       0.0    0.5         0.5   0.5

                                               0       0.0    0.0         0.0   0.0
                                                        0      1           2     3
                                                                                       x
                                                                   null

                                                             Anchor point


2011-03-25                              Array Database workshop                                 18
Seismology Use Case
      Recent aftershock in Chili

             2TB waveform data at 100Hz

             detecting seismic events using STA/
             LTA (e.g., 2 sec / 15 sec)

             remove false positives

             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop        19
Seismology Use Case
      Recent aftershock in Chili                    CREATE TABLE MSeed (
                                                       station VARCHAR(10);
                                                       ts ARRAY (
             2TB waveform data at 100Hz                   tick TIMESTAMP DIMENSION
                                                             [* : * : INTERVAL ‘0.01’ SECOND],
             detecting seismic events using STA/          data DECIMAL(8,6)
             LTA (e.g., 2 sec / 15 sec)                )
                                                    );
             remove false positives

             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                  20
Seismology Use Case
      Recent aftershock in Chili                    --- avg of 2 sec. windows:

                                                    SELECT A.station, A.ts.tick, AVG(A.ts.data)
             2TB waveform data at 100Hz             FROM MSeed AS A
                                                    GROUP BY
             detecting seismic events using STA/      A.ts[tick - INTERVAL ‘2’ SECOND : tick];
             LTA (e.g., 2 sec / 15 sec)

             remove false positives

             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                   21
Seismology Use Case
      Recent aftershock in Chili                    CREATE TABLE Event(
                                                      station STRING,
                                                      tick     TIMESTAMP,
             2TB waveform data at 100Hz               ratio FLOAT)
                                                    AS
             detecting seismic events using STA/    SELECT A.station, A.ts.tick,
             LTA (e.g., 2 sec / 15 sec)                 AVG(A.ts.data)/AVG(B.ts.data) AS ratio
                                                    FROM MSeed AS A, MSeed AS B
             remove false positives                 WHERE A.station = B.station
                                                        AND A.ts.tick = B.ts.tick
                                                    GROUP BY
             window-based 3 min. cuts                   A.ts[tick - INTERVAL ‘2’ SECOND : tick],
                                                        B.ts[tick - INTERVAL ‘15’ SECOND : tick]
             heuristic tests                        HAVING AVG(A.ts.data)/AVG(B.ts.data) > ?delta
                                                    WITH DATA;
      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                     22
Seismology Use Case
      Recent aftershock in Chili                    -- detect isolated errors by direct environment
                                                    -- using wave propagation statics
             2TB waveform data at 100Hz             CREATE TABLE Neighbors(
                                                       head STRING,
             detecting seismic events using STA/       tail STRING,
             LTA (e.g., 2 sec / 15 sec)                delay TIMESTAMP,
                                                       weight FLOAT
             remove false positives                 );

             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                       23
Seismology Use Case
      Recent aftershock in Chili                    -- detect false positives:

                                                    SELECT A.station, A.tick
             2TB waveform data at 100Hz             FROM Event AS A, Event AS B, Neighbor AS N
                                                    WHERE A.station = N.head
             detecting seismic events using STA/      AND B.station = N.tail
             LTA (e.g., 2 sec / 15 sec)               AND B.tick = A.tick + N.delay
                                                      AND A.ratio > B.ratio * N.weight;
             remove false positives
                                                    -- remove the false positives from Event
             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                  24
Seismology Use Case
      Recent aftershock in Chili                    -- pass time series to a UDF, written in, e.g., C:

                                                    SELECT A.station, myfunction(A.ts)
             2TB waveform data at 100Hz             FROM MSeed A, Event B
                                                    WHERE A.station = B.station
             detecting seismic events using STA/      AND A.ts.tick = B.tick
             LTA (e.g., 2 sec / 15 sec)             GROUP BY DISTINCT
                                                      A.ts[tick - INTERVAL ‘3’ MINUTE : tick];
             remove false positives

             window-based 3 min. cuts

             heuristic tests

      Current problems

             accessing waveform files too slow

             unpacking and positioning MSEED
             data takes too long




2011-03-25                              Array Database workshop                                          25
Conclusion
             Appropriate array denotations

             Functional complete operation set

             Size limitations due to (blob) representations

             Existing foreign files?

             Scale?




             An Array DBMS for sciences
                Symbiosis of relational and array paradigms


2011-03-25                       Array Database workshop               26

More Related Content

Similar to SciQL, A Query Language for Science Applications

SciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMSSciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMSPlanetData Network of Excellence
 
Adobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALAdobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALDaniel Freeman
 
Distributed Architecture of Subspace Clustering and Related
Distributed Architecture of Subspace Clustering and RelatedDistributed Architecture of Subspace Clustering and Related
Distributed Architecture of Subspace Clustering and RelatedPei-Che Chang
 
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...zukun
 
SQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingSQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingMichael Rys
 
Support vector machine
Support vector machineSupport vector machine
Support vector machineRishabh Gupta
 
Configuring Mahout Clustering Jobs - Frank Scholten
Configuring Mahout Clustering Jobs - Frank ScholtenConfiguring Mahout Clustering Jobs - Frank Scholten
Configuring Mahout Clustering Jobs - Frank Scholtenlucenerevolution
 
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVM
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVMTUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVM
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVMMediaEval2012
 
Principal Component Analysis For Novelty Detection
Principal Component Analysis For Novelty DetectionPrincipal Component Analysis For Novelty Detection
Principal Component Analysis For Novelty DetectionJordan McBain
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Dataswissnex San Francisco
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to MatlabAmr Rashed
 
Indexing and Mining a Billion Time series using iSAX 2.0
Indexing and Mining a Billion Time series using iSAX 2.0Indexing and Mining a Billion Time series using iSAX 2.0
Indexing and Mining a Billion Time series using iSAX 2.0Vasu Jain
 
Stale pointers are the new black
Stale pointers are the new blackStale pointers are the new black
Stale pointers are the new blackVincenzo Iozzo
 
Introducing Reactive Machine Learning
Introducing Reactive Machine LearningIntroducing Reactive Machine Learning
Introducing Reactive Machine LearningJeff Smith
 

Similar to SciQL, A Query Language for Science Applications (19)

SciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMSSciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMS
 
What is matlab
What is matlabWhat is matlab
What is matlab
 
Adobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALAdobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGAL
 
Distributed Architecture of Subspace Clustering and Related
Distributed Architecture of Subspace Clustering and RelatedDistributed Architecture of Subspace Clustering and Related
Distributed Architecture of Subspace Clustering and Related
 
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...
CVPR2009 tutorial: Kernel Methods in Computer Vision: part I: Introduction to...
 
SQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingSQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial Indexing
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
talk9.ppt
talk9.ppttalk9.ppt
talk9.ppt
 
Configuring Mahout Clustering Jobs - Frank Scholten
Configuring Mahout Clustering Jobs - Frank ScholtenConfiguring Mahout Clustering Jobs - Frank Scholten
Configuring Mahout Clustering Jobs - Frank Scholten
 
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVM
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVMTUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVM
TUKE MediaEval 2012: Spoken Web Search using DTW and Unsupervised SVM
 
Principal Component Analysis For Novelty Detection
Principal Component Analysis For Novelty DetectionPrincipal Component Analysis For Novelty Detection
Principal Component Analysis For Novelty Detection
 
Enter The Matrix
Enter The MatrixEnter The Matrix
Enter The Matrix
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Data
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Indexing and Mining a Billion Time series using iSAX 2.0
Indexing and Mining a Billion Time series using iSAX 2.0Indexing and Mining a Billion Time series using iSAX 2.0
Indexing and Mining a Billion Time series using iSAX 2.0
 
Stale pointers are the new black
Stale pointers are the new blackStale pointers are the new black
Stale pointers are the new black
 
Introducing Reactive Machine Learning
Introducing Reactive Machine LearningIntroducing Reactive Machine Learning
Introducing Reactive Machine Learning
 
numdoc
numdocnumdoc
numdoc
 
Data structures
Data structuresData structures
Data structures
 

More from PlanetData Network of Excellence

A Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about TrentinoA Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about TrentinoPlanetData Network of Excellence
 
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching NetworksOn Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching NetworksPlanetData Network of Excellence
 
Towards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory SensingTowards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory SensingPlanetData Network of Excellence
 
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstreamDemo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstreamPlanetData Network of Excellence
 
On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingPlanetData Network of Excellence
 
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...PlanetData Network of Excellence
 
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatchLinking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatchPlanetData Network of Excellence
 
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduceScalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReducePlanetData Network of Excellence
 
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...PlanetData Network of Excellence
 
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of FactsTowards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of FactsPlanetData Network of Excellence
 
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...PlanetData Network of Excellence
 
Adaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsAdaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsPlanetData Network of Excellence
 

More from PlanetData Network of Excellence (20)

Dl2014 slides
Dl2014 slidesDl2014 slides
Dl2014 slides
 
A Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about TrentinoA Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about Trentino
 
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching NetworksOn Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
 
Towards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory SensingTowards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory Sensing
 
Privacy-Preserving Schema Reuse
Privacy-Preserving Schema ReusePrivacy-Preserving Schema Reuse
Privacy-Preserving Schema Reuse
 
Pay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching NetworksPay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching Networks
 
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstreamDemo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
 
On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream Processing
 
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
 
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatchLinking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
 
CLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data ArchitectureCLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data Architecture
 
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduceScalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
 
Data and Knowledge Evolution
Data and Knowledge Evolution  Data and Knowledge Evolution
Data and Knowledge Evolution
 
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
 
Access Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract ModelsAccess Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract Models
 
Abstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF DatasetsAbstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF Datasets
 
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of FactsTowards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
 
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
 
Heuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQLHeuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQL
 
Adaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsAdaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of Endpoints
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

SciQL, A Query Language for Science Applications

  • 1. SciQL A Query Language for Science Applications M. Kersten, Y. Zhang, M. Ivanova, N. Nes CWI Amsterdam Array Database Workshop March 25th, 2011
  • 2. Who needs arrays anyway? Seismology – 1-D time-series, 3-D spatial data Astronomy – temporal ordered rasters Climate simulation – temporal ordered grid Remote sensing – images of 2-D or higher Genomics – ordered DNA strings Scientists love arrays: HDF5, NETCDF, FITS, MSEED, … but also use: lists, tables, XML, ... 2011-03-25 Array Database workshop 2
  • 3. Arrays In DBMS Research issues already in the 80’s SQL language extension (add notion of order): RasQL, AQuery, SRQL, ... SQL:1999, SQL:2003 collection type, C-style arrays Algebraic frameworks (S)RAM, AQL, AML, ... 2011-03-25 Array Database workshop 3
  • 4. Arrays In DBMS DBMS support OODB, multi-dimensional DBMS, Sequence DBMS, ... the Longhorn Array Database RasDaMan Array in chunks as BLOB Array query optimisation on top of DBMS Known to work up to 12 TBs! PostgreSQL 8.1 SciDB Array DBMS from scratch Overlapping chunks for parallel execution 2011-03-25 Array Database workshop 4
  • 5. What is the problem with RDBMS? Appropriate array denotations? Functional complete operation set? Size limitations due to (BLOB) representations? Existing foreign files? Scale? ... 2011-03-25 Array Database workshop 5
  • 6. SciQL An extension of SQL:2003 (pronounced as ‘cycle’) Array as first class citizens of DBMS Seamless integration of tables and arrays Named dimensions with constraints Flexible structure-based grouping Seismology use case 2011-03-25 Array Database workshop 6
  • 7. Array Definitions Fixed array y null CREATE ARRAY A1 ( 3 0.0 0.0 0.0 0.0 x INT DIMENSION[0:4:1], 2 0.0 0.0 0.0 0.0 y INT DIMENSION[0:4:1], null null 1 0.0 0.0 0.0 0.0 v FLOAT DEFAULT 0.0 ); 0 0.0 0.0 0.0 0.0 x 0 1 2 3 null 2011-03-25 Array Database workshop 7
  • 8. Array Definitions Fixed array y null CREATE ARRAY A1 ( 3 0.0 0.0 0.0 0.0 x INT DIMENSION[0:4:1], 2 0.0 0.0 0.0 0.0 y INT DIMENSION[0:4:1], null null 1 0.0 0.0 0.0 0.0 v FLOAT DEFAULT 0.0 ); 0 0.0 0.0 0.0 0.0 x 0 1 2 3 null Unbounded array y CREATE ARRAY A2 ( 3 x INT DIMENSION, 2 y INT DIMENSION, null 1 v FLOAT DEFAULT 0.0 0 ); x 0 1 2 3 2011-03-25 Array Database workshop 7
  • 9. Array Definitions Fixed array y null CREATE ARRAY A1 ( 3 0.0 0.0 0.0 0.0 x INT DIMENSION[0:4:1], 2 0.0 0.0 0.0 0.0 y INT DIMENSION[0:4:1], null null 1 0.0 0.0 0.0 0.0 v FLOAT DEFAULT 0.0 ); 0 0.0 0.0 0.0 0.0 x 0 1 2 3 null Unbounded array y CREATE ARRAY A2 ( 3 x INT DIMENSION, 2 y INT DIMENSION, null 1 v FLOAT DEFAULT 0.0 0 ); x 0 1 2 3 y 3 null INSERT INTO A2 VALUES 2 0.0 4.5 (1,0,5.5), (1,1,0.4), (2,2,4.5); 1 null 0.4 0.0 null 0 5.5 0.0 x 0 1 2 3 null 2011-03-25 Array Database workshop 7
  • 10. Array Definitions Fixed array y null CREATE ARRAY A1 ( 3 0.0 0.0 0.0 0.0 x INT DIMENSION[0:4:1], 2 0.0 0.0 0.0 0.0 y INT DIMENSION[0:4:1], null null 1 0.0 0.0 0.0 0.0 v FLOAT DEFAULT 0.0 ); 0 0.0 0.0 0.0 0.0 x 0 1 2 3 null Unbounded array y CREATE ARRAY A2 ( 3 x INT DIMENSION, 2 y INT DIMENSION, null 1 v FLOAT DEFAULT 0.0 0 ); x 0 1 2 implicit size 3 y 3 null INSERT INTO A2 VALUES 2 0.0 4.5 (1,0,5.5), (1,1,0.4), (2,2,4.5); 1 null 0.4 0.0 null 0 5.5 0.0 x 0 1 2 3 null 2011-03-25 Array Database workshop 7
  • 11. Array Dimensions CREATE ARRAY A1 ( CREATE ARRAY A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION, y INT DIMENSION[0:4:1], y INT DIMENSION, v FLOAT DEFAULT 0.0 v FLOAT DEFAULT 0.0 ); ); Fixed dimensions: [start:final:step] INT dimension: [size] Unbounded dimensions: [(start|∗) : (final|∗) : (step|∗)] Dimension data type: scalar data types Time series: CREATE ARRAY Experiment ( time TIMESTAMP DIMENSION [TIMESTAMP ‘2011-03-25’ : * : INTERVAL ‘1’ MINUTE], data FLOAT ); 2011-03-25 Array Database workshop 8
  • 12. Array versus Table CREATE ARRAY A1 ( CREATE TABLE T1 ( x INT DIMENSION[0:4:1], x INT, y INT DIMENSION[0:4:1], y INT, PRIMARY KEY (x,y), v FLOAT DEFAULT 0.0 v FLOAT DEFAULT 0.0 ); ); SELECT * FROM A1; SELECT * FROM T1; x y v x y v 0 0 0.0 0 1 0.0 0 2 0.0 0 3 0.0 1 0 0.0 1 1 0.0 1 2 0.0 1 3 0.0 2 0 0.0 2 1 0.0 2 2 0.0 2 3 0.0 3 0 0.0 3 1 0.0 3 2 0.0 3 3 0.0 2011-03-25 Array Database workshop 9
  • 13. Array versus Table CREATE ARRAY A1 ( CREATE TABLE T1 ( x INT DIMENSION[0:4:1], x INT, y INT DIMENSION[0:4:1], y INT, PRIMARY KEY (x,y), v FLOAT DEFAULT 0.0 v FLOAT DEFAULT 0.0 ); ); SELECT * FROM A1; SELECT * FROM T1; x y v x y v 0 0 0.0 0 1 0.0 0 2 0.0 0 3 0.0 1 0 0.0 1 1 0.0 1 2 0.0 1 3 0.0 2 0 0.0 2 1 0.0 2 2 0.0 2 3 0.0 3 0 0.0 3 1 0.0 3 2 0.0 3 3 0.0 2011-03-25 Array Database workshop 9
  • 14. Array versus Table CREATE ARRAY A1 ( CREATE TABLE T1 ( x INT DIMENSION[0:4:1], x INT, y INT DIMENSION[0:4:1], y INT, PRIMARY KEY (x,y), v FLOAT DEFAULT 0.0 v FLOAT DEFAULT 0.0 ); ); A collection of a priori defined tuples A collection of tuples To be updated with INSERT/DELETE Explicitly create/remove with INSERT/ (and UPDATE) DELETE Indexed by dimension expressions Indexed by a (primary) key Default value for non-dimensional Default value for each column attributes (i.e., cells) 2011-03-25 Array Database workshop 10
  • 15. Array & Table Coercions CREATE ARRAY A1 ( SELECT x, y, v FROM A1; x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], x y v v FLOAT DEFAULT 0.0 0 0 0.0 ); 0 1 0.0 y null 0 2 0.0 3 0.0 0.0 0.0 0.0 0 3 0.0 null 2 0.0 0.0 0.0 0.0 null 1 0 0.0 1 0.0 0.0 0.0 0.0 1 1 0.0 0 0.0 0.0 0.0 0.0 0 1 2 3 x 1 2 0.0 null 1 3 0.0 2 0 0.0 2 1 0.0 2 2 0.0 2 3 0.0 3 0 0.0 3 1 0.0 3 2 0.0 3 3 0.0 2011-03-25 Array Database workshop 11
  • 16. Array & Table Coercions CREATE ARRAY A1 ( SELECT x, y, v FROM A1; x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], x y v v FLOAT DEFAULT 0.0 0 0 0.0 ); 0 1 0.0 y null 0 2 0.0 3 0.0 0.0 0.0 0.0 0 3 0.0 null 2 0.0 0.0 0.0 0.0 null 1 0 0.0 1 0.0 0.0 0.0 0.0 1 1 0.0 0 0.0 0.0 0.0 0.0 0 1 2 3 x 1 2 0.0 null 1 3 0.0 2 0 0.0 2 1 0.0 2 2 0.0 2 3 0.0 3 0 0.0 full materialisation! 3 1 0.0 3 2 0.0 3 3 0.0 2011-03-25 Array Database workshop 11
  • 17. Array & Table Coercions CREATE TABLE T2 ( x INT, y INT, v FLOAT ); INSERT INTO T2 VALUES (1,0,5.5), (1,1,0.4), (2,2,4.5), (1,1,1.3); x y v 1 0 5.5 1 1 0.4 2 2 4.5 1 1 1.3 2011-03-25 Array Database workshop 12
  • 18. Array & Table Coercions CREATE TABLE T2 ( x INT, y INT, v FLOAT ); INSERT INTO T2 VALUES SELECT [x], [y], v FROM T2; (1,0,5.5), (1,1,0.4), (2,2,4.5), (1,1,1.3); y x y v 3 0.0 1 0 5.5 2 0.0 4.5 1 1 0.4 1 0.0 0.4 0.0 0.0 2 2 4.5 0 5.5 0.0 1 1 1.3 x 0 1 2 3 0.0 An unbounded array min/max of dimensions are derived from the minimal bounding rectangle non-dimentional attributes inherit default column values duplicates are overwritten 2011-03-25 Array Database workshop 12
  • 19. Array Modifications CREATE ARRAY A1 ( x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); DELETE FROM A1 WHERE x = 1; y null 3 0.0 null 0.0 0.0 2 0.0 null 0.0 0.0 null null 1 0.0 null 0.0 0.0 0 0.0 null 0.0 0.0 0 1 2 3 x null 2011-03-25 Array Database workshop 13
  • 20. Array Modifications CREATE ARRAY A1 ( x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); DELETE FROM A1 WHERE x = 1; y null 3 0.0 null 0.0 0.0 2 0.0 null 0.0 0.0 null null 1 0.0 null 0.0 0.0 0 0.0 null 0.0 0.0 0 1 2 3 x null creates holes in the array 2011-03-25 Array Database workshop 13
  • 21. Array Modifications CREATE ARRAY A1 ( x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES (1,1,0.5), (2,1,0.5), (3,1,0.5); y null 3 0.0 null 0.0 0.0 2 0.0 null 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 null 0.0 0.0 0 1 2 3 x null 2011-03-25 Array Database workshop 14
  • 22. Array Modifications CREATE ARRAY A1 ( x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES (1,1,0.5), (2,1,0.5), (3,1,0.5); y null 3 0.0 null 0.0 0.0 2 0.0 null 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 null 0.0 0.0 0 1 2 3 x null set (change) values of cells 2011-03-25 Array Database workshop 14
  • 23. Array Views CREATE ARRAY A1 ( x INT DIMENSION[0:4:1], y INT DIMENSION[0:4:1], v FLOAT DEFAULT -1.0 ); INSERT INTO A1 VALUES (1,1,0.5), (2,1,0.5), (3,1,0.5); y null 3 -1.0 -1.0 -1.0 -1.0 2 -1.0 -1.0 -1.0 -1.0 null null 1 -1.0 0.5 0.5 0.5 0 -1.0 -1.0 -1.0 -1.0 0 1 2 3 x null 2011-03-25 Array Database workshop 15
  • 24. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null 3 -1.0 -1.0 -1.0 -1.0 2 -1.0 -1.0 -1.0 -1.0 null null 1 -1.0 0.5 0.5 0.5 0 -1.0 -1.0 -1.0 -1.0 0 1 2 3 x null 2011-03-25 Array Database workshop 15
  • 25. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null 3 -1.0 -1.0 -1.0 -1.0 2 -1.0 -1.0 -1.0 -1.0 null null 1 -1.0 0.5 0.5 0.5 0 -1.0 -1.0 -1.0 -1.0 0 1 2 3 x null 2011-03-25 Array Database workshop 15
  • 26. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null 3 -1.0 -1.0 -1.0 -1.0 2 -1.0 -1.0 -1.0 -1.0 null null 1 -1.0 0.5 0.5 0.5 0 -1.0 -1.0 -1.0 -1.0 0 1 2 3 x null 2011-03-25 Array Database workshop 15
  • 27. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null y null 4 0.0 0.0 0.0 0.0 0.0 0.0 3 -1.0 -1.0 -1.0 -1.0 3 0.0 0.0 0.0 0.0 0.0 0.0 2 -1.0 -1.0 -1.0 -1.0 2 0.0 0.0 0.0 0.0 0.0 0.0 null null null null 1 -1.0 0.5 0.5 0.5 1 0.0 0.0 0.0 0.0 0.0 0.0 0 -1.0 -1.0 -1.0 -1.0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 1 2 3 x -1 0.0 0.0 0.0 0.0 0.0 0.0 null -1 0 1 2 3 4 x null 2011-03-25 Array Database workshop 15
  • 28. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null y null 4 0.0 0.0 0.0 0.0 0.0 0.0 3 -1.0 -1.0 -1.0 -1.0 3 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 2 -1.0 -1.0 -1.0 -1.0 2 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 null null null null 1 -1.0 0.5 0.5 0.5 1 0.0 0.5 0.0 0.5 0.0 0.5 0.0 0.0 0.0 0 -1.0 -1.0 -1.0 -1.0 0 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 0 1 2 3 x -1 0.0 0.0 0.0 0.0 0.0 0.0 null -1 0 1 2 3 4 x null 2011-03-25 Array Database workshop 15
  • 29. Array Views CREATE ARRAY A1 ( CREATE ARRAY VIEW A2 ( x INT DIMENSION[0:4:1], x INT DIMENSION [-1:5:1], y INT DIMENSION[0:4:1], y INT DIMENSION [-1:5:1], v FLOAT DEFAULT -1.0 w FLOAT DEFAULT 0.0 ); ) AS SELECT x-1, y, v FROM A1 WHERE x > 1 INSERT INTO A1 VALUES UNION (1,1,0.5), (2,1,0.5), (3,1,0.5); SELECT x, y, 1.0 FROM A1 WHERE x = 3; y null y null 4 0.0 0.0 0.0 0.0 0.0 0.0 3 -1.0 -1.0 -1.0 -1.0 3 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 1.0 0.0 2 -1.0 -1.0 -1.0 -1.0 2 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 1.0 0.0 null null null null 1 -1.0 0.5 0.5 0.5 1 0.0 0.5 0.0 0.5 0.0 0.5 0.0 1.0 0.0 0.0 0 -1.0 -1.0 -1.0 -1.0 0 0.0 -1.0 -1.0 -1.0 0.0 0.0 0.0 0.0 1.0 0.0 0 1 2 3 x -1 0.0 0.0 0.0 0.0 0.0 0.0 null -1 0 1 2 3 4 x null 2011-03-25 Array Database workshop 15
  • 30. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null 2011-03-25 Array Database workshop 16
  • 31. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 32. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 33. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 34. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 35. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 36. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 37. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 16
  • 38. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 tiling ≠ 0 0.0 0.0 0.0 0.0 windowing x 0 1 2 3 null Anchor point 2011-03-25 Array Database workshop 16
  • 39. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null 2011-03-25 Array Database workshop 17
  • 40. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 41. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 42. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 43. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 44. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 45. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 46. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 47. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1 x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x:x+2][y:y+2]; y INT DIMENSION[0:4:1], v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 17
  • 48. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1[1:*][1:*] x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x-1][y], A1[x][y-1], y INT DIMENSION[0:4:1], A1[x][y], A1[x+1][y], A1[x][y+1]; v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null 2011-03-25 Array Database workshop 18
  • 49. Array Tiling CREATE ARRAY A1 ( SELECT [x], [y], AVG(v) FROM A1[1:*][1:*] x INT DIMENSION[0:4:1], GROUP BY DISTINCT A1[x-1][y], A1[x][y-1], y INT DIMENSION[0:4:1], A1[x][y], A1[x+1][y], A1[x][y+1]; v FLOAT DEFAULT 0.0 ); INSERT INTO A1 VALUES y null (1,1,0.5), (2,1,0.5), (3,1,0.5); 3 0.0 0.0 0.0 0.0 2 0.0 0.0 0.0 0.0 null null 1 0.0 0.5 0.5 0.5 0 0.0 0.0 0.0 0.0 0 1 2 3 x null Anchor point 2011-03-25 Array Database workshop 18
  • 50. Seismology Use Case Recent aftershock in Chili 2TB waveform data at 100Hz detecting seismic events using STA/ LTA (e.g., 2 sec / 15 sec) remove false positives window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 19
  • 51. Seismology Use Case Recent aftershock in Chili CREATE TABLE MSeed ( station VARCHAR(10); ts ARRAY ( 2TB waveform data at 100Hz tick TIMESTAMP DIMENSION [* : * : INTERVAL ‘0.01’ SECOND], detecting seismic events using STA/ data DECIMAL(8,6) LTA (e.g., 2 sec / 15 sec) ) ); remove false positives window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 20
  • 52. Seismology Use Case Recent aftershock in Chili --- avg of 2 sec. windows: SELECT A.station, A.ts.tick, AVG(A.ts.data) 2TB waveform data at 100Hz FROM MSeed AS A GROUP BY detecting seismic events using STA/ A.ts[tick - INTERVAL ‘2’ SECOND : tick]; LTA (e.g., 2 sec / 15 sec) remove false positives window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 21
  • 53. Seismology Use Case Recent aftershock in Chili CREATE TABLE Event( station STRING, tick TIMESTAMP, 2TB waveform data at 100Hz ratio FLOAT) AS detecting seismic events using STA/ SELECT A.station, A.ts.tick, LTA (e.g., 2 sec / 15 sec) AVG(A.ts.data)/AVG(B.ts.data) AS ratio FROM MSeed AS A, MSeed AS B remove false positives WHERE A.station = B.station AND A.ts.tick = B.ts.tick GROUP BY window-based 3 min. cuts A.ts[tick - INTERVAL ‘2’ SECOND : tick], B.ts[tick - INTERVAL ‘15’ SECOND : tick] heuristic tests HAVING AVG(A.ts.data)/AVG(B.ts.data) > ?delta WITH DATA; Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 22
  • 54. Seismology Use Case Recent aftershock in Chili -- detect isolated errors by direct environment -- using wave propagation statics 2TB waveform data at 100Hz CREATE TABLE Neighbors( head STRING, detecting seismic events using STA/ tail STRING, LTA (e.g., 2 sec / 15 sec) delay TIMESTAMP, weight FLOAT remove false positives ); window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 23
  • 55. Seismology Use Case Recent aftershock in Chili -- detect false positives: SELECT A.station, A.tick 2TB waveform data at 100Hz FROM Event AS A, Event AS B, Neighbor AS N WHERE A.station = N.head detecting seismic events using STA/ AND B.station = N.tail LTA (e.g., 2 sec / 15 sec) AND B.tick = A.tick + N.delay AND A.ratio > B.ratio * N.weight; remove false positives -- remove the false positives from Event window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 24
  • 56. Seismology Use Case Recent aftershock in Chili -- pass time series to a UDF, written in, e.g., C: SELECT A.station, myfunction(A.ts) 2TB waveform data at 100Hz FROM MSeed A, Event B WHERE A.station = B.station detecting seismic events using STA/ AND A.ts.tick = B.tick LTA (e.g., 2 sec / 15 sec) GROUP BY DISTINCT A.ts[tick - INTERVAL ‘3’ MINUTE : tick]; remove false positives window-based 3 min. cuts heuristic tests Current problems accessing waveform files too slow unpacking and positioning MSEED data takes too long 2011-03-25 Array Database workshop 25
  • 57. Conclusion Appropriate array denotations Functional complete operation set Size limitations due to (blob) representations Existing foreign files? Scale? An Array DBMS for sciences Symbiosis of relational and array paradigms 2011-03-25 Array Database workshop 26