Upload
saireya-
View
52
Download
2
Embed Size (px)
Citation preview
Extending Relational Data Model with Merged Cells
February 25, 2015
1 / 26
Background
(table)
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141
Table: (: [5])
2 / 26
Background
Problem
Avoid merged cells(TechRepublic10 ways to keep Excel from biting you in the butt)
Bad Data(Paul MurrellBad Data Handbook)
Excel( Excel, 2013)
Research purpose
3 / 26
Background
Remark
col1 col2 col3 col4val1 vala valA
valval2 valbval3 valC
Figure:
col1 col2 col3 col4val1 valA
valval2
Figure:
4 / 26
Background
Research process
1
2
3
4
5 / 26
Previous works
Research process
1
2
3
4
6 / 26
Previous works
nested relation (1NF)
name address birthdate movies
Fishercity street
Maple H'woodLocust Malibu
9/9/99
title year lengthStar wars 1977 124Empire 1980 127Return 1983 133
Hamillcity street
Oak B'wood8/3/88
title year lengthStar wars 1977 124Empire 1980 127Return 1983 133
Figure: nested relation (:DBInfoBlog[1])
7 / 26
Previous works
nested relation (1)
R(name, address(city, street), birthdate, movies(title, year, length))
()
R(R1(col1, col2), col3, col4)
R(col1,R2(col2, col3), col4)
col1 col2 col3 col4val1 vala valA
valval2 valbval3 valC
Figure: ()8 / 26
Previous works
nested relation (2)
()
nested relation nest,unnest (Jaeschke et al., 1982)
H23.10.1 5 5 5 H23.10.1 - 25 25 H23.10.1 10 10 H23.10.1 - 25 25
131I 134Cs 137Cs
134Cs,137Cs
Figure: (:)
9 / 26
Previous works
(OLAP)
OLAP() [2]
roll-up: 1
drill-down: roll-up
roll-up,drill-down
256 26 203 32 1,180 141
Table: roll-up
ALL 1,639 199
Table: roll-up
10 / 26
Advantages and Disadvantages of merged cells
Research process
1
2
3
4
11 / 26
Advantages and Disadvantages of merged cells
Advantage
()
(OK)
1,000 600 800 400
300Table: (:)
256 26 1,213 154 130 199 203 32 1,180 141Table:
12 / 26
Advantages and Disadvantages of merged cells
Disadvantage
()(?)
()
()
H23.10.1 5 5 5 H23.10.1 - 25 25 H23.10.1 10 10 H23.10.1 - 25 25
131I 134Cs 137Cs
134Cs,137Cs
Figure: ()
13 / 26
Advantages and Disadvantages of merged cells
DBMS
Figure:
14 / 26
Advantages and Disadvantages of merged cells
Approach
roll-up, drill-down
15 / 26
Proposing Datamodel
Research process
1
2
3
4
16 / 26
Proposing Datamodel
Schema (R,T ,F ) 3
R
T = (VT ,ET ) (DAG)
T
F T
sum: (sum(1, 3) = 4)
pack: (pack(1, 1) = 1, pack(1, 3) = (1, 3))
17 / 26
Proposing Datamodel
Figure: DAG T
(R,T ,F )
R = (, , , )
VT = {, , }
ET = { , }
+ = F = {sum }
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141Table: ()
18 / 26
Proposing Datamodel
Instance (R,T ,F ) I
x ()
x1, , x7 I = {xi}
x1() = 256, x1() = undened
x2() = undened, x2() = 1213
x1 783 256 26x2 2,719 1,213x3 164 154x7 1,090 1,180 141
Table: ()
19 / 26
Proposing Datamodel
roll-up
f ( F )
f I = {f x x I}
f x(A) =
f (x(dom(f ))) (A = im(f ))
x(A) (otherwise)
drill-down
f ( F ) f 1
f I = {f x x I}
f x(A) =
v s.t. f ( , v,) = x(im(f )) (A dom(f ))
x(A) (otherwise)
f ( roll-up drill-down)20 / 26
Proposing Datamodel
roll-up
sum roll-up
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141Table: ()
783 282 2,719 1,213 164 154 91 130 409 199 179 235 1,090 1,321
Table: sum roll-up
21 / 26
Proposing Datamodel
roll-up
1
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141Table: ()
783 282 2,719 1,213 164 154 91 130 409 199 179 235 1,090 1,321
Table: sum roll-up
22 / 26
Proposing Datamodel
drill-down pack drill-down
1,000 600 400 800 400 300
300 200 Table: ()
1,000 600 400 800 400 300
300 300 200 Table: pack drill-down
23 / 26
Classifying tables
Research process
1
2
3
4
24 / 26
Classifying tables
C0,C1,C2 3(C2 C1 C0)
C0: (R,T ,F )
C1: (FD)( or)
C2:
H23.10.1 5 5 5 H23.10.1 - 25 25 H23.10.1 10 10 H23.10.1 - 25 25
131I 134Cs 137Cs
134Cs,137Cs
25 / 26
Conclusion
roll-up, drill-down
Future tasks
1NF DDNF()
DBMS
26 / 26
Purpose
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141
Table: (: [5])
27 / 26
Previous works
Excel Excel ( [6], 2013)
2 Cs ()
H23.10.1 5 5 5 H23.10.1 - 25 25 H23.10.1 10 10 H23.10.1 - 25 25
131I 134Cs 137Cs
134Cs,137Cs
Figure: Excel ( Bq/kg: [4])
28 / 26
Previous works
Spreadsheet Algebra
Liu,JagadishA Spreadsheet Algebra for a Direct Data ManipulationQuery Interface(2009)[3]
SQL GROUP BY HAVING
29 / 26
Proposing Datamodel
sum: (sum(1, 3) = 4)
avg: (avg(1, 3) = 2)
max: (max(1, 3) = 3)
cat: (cat(c, a, t) = cat)
tuple: (tuple(1, 3) = (1, 3))
pack: (pack(1, 1) = 1, pack(1, 3) = (1, 3))
30 / 26
Proposing Datamodel
Instance (R,T ,F ) I
x
3 (vij , g, f ) vij g f
Group
31 / 26
Proposing Datamodel
Figure: DAG T
x1() = (, null,True), x1() =(256, null,True), x1() = undened
x2() = undened,x2() = (1213, null,True)
x3, , x7I = {xi}
783 256 26 2,719 1,213 164 154 91 130 409 199 179 203 32 1,090 1,180 141Table: ()
32 / 26
Classifying tables
roll-up, drill-down roll-up (RUNF): roll-up 1NF
drill-down (DDNF): drill-down 1NF
1NF()
33 / 26
Reference I
DBInfoBlog. Nested Relations. 2013. url:http://www.dbinfoblog.com/post/121/nested-relations.
Jim Gray et al. Data Cube: A Relational Aggregation Operator Generalizing Group-By,Cross-Tab, and Sub-Totals. In: Data Mining and Knowledge Discovery 1.1 (1997),pp. 2953. doi: 10.1023/A:1009726021843.
Bin Liu and H.V. Jagadish. A Spreadsheet Algebra for a Direct Data Manipulation QueryInterface. In: Data Engineering, 2009. ICDE 09. IEEE 25th International Conference on.2009. doi: 10.1109/ICDE.2009.34.
. . 2011. url:http://www.mhlw.go.jp/stf/houdou/2r9852000001q51k-att/2r9852000001qjsv.pdf.
. (). 2013.url: http://www.mext.go.jp/b_menu/shingi/chukyo/chukyo0/gijiroku/attach/__icsFiles/afieldfile/2013/10/16/1340415-9-2.pdf.
. Excel. In: SSS2013 (2013), pp. 9398. url: http://oku.edu.mie-u.ac.jp/~okumura/SSS2013.pdf.
34 / 26
BackgroundPrevious worksAdvantages and Disadvantages of merged cellsProposing DatamodelClassifying tablesConclusionAppendixPurposePrevious worksProposing DatamodelClassifying tables