• Non ci sono risultati.

Data Warehousing

N/A
N/A
Protected

Academic year: 2021

Condividi "Data Warehousing"

Copied!
3
0
0

Testo completo

(1)

Data Warehousing

Politecnico di Torino

Versioning services

Conceptual design

(2)

Logical design

Primary keys are underlined.

GIT (BId, TId, CId, hour, #commits, #additions, #deletions)

BRANCH (BId, branchname, creationdate, creationyear, repositoryname, company, visibility, category, scala, python, java, ...)

TIME (TId, date, month, bimester, 4-months, trimester, year, monthofyear, 4- monthsofyear)

COLLABORATOR (CId, role, yearsexperience, workteam)

Queries Query A

Consider only private repositories. Separately for month and repository name, analyze: the number of commits made on average in a day, the number of commits made on average in a branch, the monthly cumulative number of commits from the beginning of the year.

SELECT

repositoryname, month,

sum(#commits)/count(distinct date), sum(#commits)/count(distinct bid),

sum(sum(#commits)) over (partition by repositoryname, year

order by month rows unbounded preceding) FROM

git g, time t, branch b WHERE

g.bid = b.bid and g.tid = t.tid AND private = True

GROUP BY

repositoryname, month, year

(3)

Query B

Consider data related to repositories which include the ‘Scala’ language. Separately for branch and work team, analyze: the ratio between the number of additions and the number of deletions, the percentage of additions with respect to the total of the repository the branch belongs to, assign a rank to work teams based on the ratio between the number of additions and the number of deletions, separately for each branch.

SELECT

bid, branchname, repositoryname, workteam, sum(#additions)/sum(#deletions),

sum(#additions)/sum(sum(#deletions))

over (partition by repository, workteam), rank() over (partition by bid

order by sum(#additions)/sum(#deletions)) FROM

git g, branch b, collaborator c WHERE

g.bid = b.bid and g.cid = c.cid and scala_language = true

GROUP BY

bid, branchname, repositoryname, workteam

Riferimenti

Documenti correlati

In this work 68 ethnic seafood products unprocessed or variously processed (dried, salted, roasted, smoked and canned) were purchased and a molecular analysis, based on DNA

Government Printing Office , Social Security Administration (US)..

For positive integer n and i ∈ {0, 1}, let D i (n) be the number of derangements on n elements whose number of cycles has the same parity

[r]

To drill a cube is to partition it into 27 congruent subcubes and remove the closed central cube along with the 6 remaining subcubes sharing a face with that cube, resulting in a

[r]

& Conti F., 2015a – Contributo alla flora vascolare dell’Umbria (Italia centrale). Bartolucci F., Nepi C.,

Au total, les saints laïcs médiévaux originaires de Venise et vénérés dans cette ville sont peu nombreux – 5 au maximum avec Anna Michiel Giustiniani dont