cli:franke:shared_data

Shared production data

DB Server 10.100.145.20 (fkt20g.fa.franke.world)
DB Server Port 5432
DBMS Postgresql
ODBC Driver 32bit, 64bit
Database nameandon_FWK
Database schemashareddata
Username michael.lehmann (readonly)
Password Swh2Rj6Q



Entities

Entity
Name Description Attributes
Name Description Type Identifier
prodline Production resources listcodiceProduction resource unique identifiervarchar Yes
descrizioProduction resource namevarchar
codrepDepartment unique identifiervarchar
descrepDepartment descriptionvarchar
codstabPlant identifiervarchar
descstabPlant descriptionvarchar
unitprod Unique unit of production, produced itemscodiceProduced item unique identifiervarchar YES
codartProduct codevarchar
dartProduct descriptionvarchar
procordWork order (from ERP)varchar
qtaprevWork order total quantity to be produceddouble
unitaProduced items for each work cycle (generally 1)double
tmcrTime Epoch of the tracked production unit (seconds since 01/01/1970)long
datacrDate of the tracked production unit (YYYYMMGG)varchar
oracrTime of the tracked production unit (HH:MM:SS)varchar
qcausanc Non compliant causes listcodiceCause unique identifiervarchar YES
descrizioCause descriptionvarchar
qcausafm Downtime causes listcodiceDowntime unique identifiervarchar YES
descrizioDowntime description of the monitored resourcevarchar
tipofmDowntime type: F = unplanned downtime, M = microstop, P = planned downtimevarchar
setupDowntime for setup reason (flag): 1 = setup kind, 0 = general downtimeinteger

Relationships

Relationship
Name Description Components Attributes
Name Description Type
regprod Each row refers to a production event prodline, unitprod dataEvent date (YYYYMMGG)varchar
oraEvent time (HH:MM:SS)varchar
tmEvent Time Epochlong
qtaNumber of produced itemsdouble
regnc Each row refers to a non compliant production event prodline, unitprod, causanc dataEvent date (YYYYMMGG)varchar
oraEvent time (HH:MM:SS)varchar
tmEvent Time Epochlong
qtaNumber of non compliant produced itemsdouble
regfm Each row refers to a begin or an end of a downtime prodline, causafm dataEvent date (YYYYMMGG)varchar
oraEvent time (HH:MM:SS)varchar
tmEvent Time Epochlong
tmdiffTime difference from end and begin of the downtime eventslong
tipoeventoDowntime event type: INFM=downtime start, FIFM=donwtime endlong
TableForeign keys
prodline(codice, descrizio, codrep, descrep, codstab, descstab)
unitprod(codice, codart, dart, procord, qtaprev, unita, tmcr, datacr, oracr)
causanc(codice, descrizio)
causafm(codice, descrizio, tipofm, setup)
regprod(codice, data, ora, tm, qta, codlot, codubi)- codlot foreign key on unitprod.codice
- codubi foreign key on prodline.codice
regnc(codice, data, ora, tm, qta, codlot, codubi, caudef)- codlot foreign key on unitprod.codice
- codubi foreign key on prodline.codice
- caudef foreign key on causanc.codice
regfm(codice, data, ora, tm, tmdiff, tipoevento, codubi, caufm)- codubi foreign key on prodline.codice
- caufm foreign key on causafm.codice

Produced items on June 18th 2018 with date, time, unique identifier, production resource description, department description, article code (model) and work order, sorted by event time epoch

SELECT DATA, ora, codlot, prodline.descrizio AS linea, prodline.descrep, unitprod.dart, unitprod.procord FROM shareddata.regprod 
INNER JOIN shareddata.prodline ON prodline.codice=shareddata.regprod.codubi
INNER JOIN shareddata.unitprod ON unitprod.codice=shareddata.regprod.codlot
WHERE DATA='20180618'
ORDER BY tm

Count produced items after June 18th 2018 (included) grouped by day, article code and work order on production resource 821102A (DMG LB)

SELECT DATA, unitprod.dart, unitprod.procord, SUM(qta) AS pezzi FROM shareddata.regprod
INNER JOIN shareddata.unitprod ON shareddata.unitprod.codice=shareddata.regprod.codlot
WHERE regprod.codubi='821102A' AND regprod.data>='20180618'
GROUP BY DATA, dart, procord

Get the DMG LB (821102A) downtime events list from 06:00 to 14:00 of June 18th 2018 with date, time, duration in minutes, event type, downtime cause description, downtime kind, changeover time flag

SELECT DATA, ora, tmdiff/60 AS dtm, tipoevento, qcausafm.descrizio AS dfermo, qcausafm.tipofm, qcausafm.setup FROM shareddata.regfm
INNER JOIN shareddata.qcausafm ON shareddata.qcausafm.codice=regfm.caufm
WHERE codubi='821102A' AND DATA='20180618' AND ora>='06:00' AND ora<='14:00'
ORDER BY tm
  • cli/franke/shared_data.txt
  • Last modified: 2018/08/27 14:01
  • by f.zoppini