Database Schema¶
These are the schema of the tables in the backend database. The database code is all in the db submodule of snappl. Normally, you will not interact with these directly. Rather, you will call snappl library functions that contact the web API frontend to the database. You only really need to know about these if you’re working on the backend.
Last updated 2025-10-17.
Table: provenance¶
Data product provenance
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
Unique hash of the provenance |
|
|
YES |
|
Environment; see snpit_utils.provenance.Provenance.environments |
|
|
YES |
|
Semantic major version of environment for this provenance |
|
|
YES |
|
Semantic minor version of environment for this provenance |
|
|
NO |
|
Name of the process or code associated with this provenace |
|
|
NO |
|
Semantic major version of code for this provenance |
|
|
NO |
|
Semantic minor version of code for this provenance |
|
|
YES |
|
Parameters that define the process behavior for this provenance |
Table: provenance_upstream¶
Upstream linkage table for provenance
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
Table: provenance_tag¶
Human readable tags for collections of provenances
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
Human-readable tag |
|
|
NO |
|
process of the provenance; must match corresponding provenance process |
|
|
NO |
|
id of the provenance |
Table: l2image¶
L2 image
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
Pointing of the exposure this image is from |
|
|
YES |
|
SCA of this image |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
RA of pixel (0,0) |
|
|
NO |
|
RA of pixel (0,height-1) |
|
|
NO |
|
RA of pixel (width-1,0) |
|
|
NO |
|
RA of pixel (width-1,height-1) |
|
|
NO |
|
Dec of pixel (0,0) |
|
|
NO |
|
Dec of pixel (0,height-1) |
|
|
NO |
|
Dec of pixel (width-1,0) |
|
|
NO |
|
Dec of pixel (width-1,height-1) |
|
|
NO |
|
None |
|
|
YES |
|
None |
|
|
YES |
|
None |
|
|
YES |
|
None |
|
|
NO |
|
0=Unknown, 1=FITS, 2=Roman Datamodel |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
None |
Table: summed_image¶
image that is a sum of L2 images
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
None |
|
|
YES |
|
None |
|
|
YES |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
None |
Table: summed_image_component¶
summed_image linkage table
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
Table: diaobject¶
Known transients or simulated transients
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
Name or id of the transient within its provenance. |
|
|
YES |
|
IAU/TNS name of the transient. |
|
|
YES |
|
Approx (±1”ish) RA of object; ICRS decimal degrees |
|
|
YES |
|
Approx (±1”ish) Dec of object; ICRS decimal degrees |
|
|
YES |
|
MJD of image where the transient was discovered |
|
|
YES |
|
Approx. MJD where transient is at peak flux |
|
|
YES |
|
Approx. MJD where the transient lightcurve “starts” |
|
|
YES |
|
Approx. MJD where the transient lightcurve “ends” |
|
|
YES |
|
Collection-specific additional properties of the transient |
|
|
NO |
|
None |
Table: diaobject_position¶
Calculated positions for a diaobject
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
RA in ICRS decimal degrees |
|
|
YES |
|
Uncertainty on RA |
|
|
YES |
|
Dec in ICRS decimal degrees |
|
|
YES |
|
Uncertainty on Dec |
|
|
YES |
|
Covariance between RA and Dec |
|
|
YES |
|
Time when this position was calculculated |
Table: lightcurve¶
Transient object light curves; (provenance_id,diaobject_id,filter) is unique
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
None |
Table: authuser¶
Users
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
RSA public key |
|
|
YES |
|
RSA private key encrypted with user password |
Table: passwordlink¶
(no description)
Column |
Type |
null? |
Default |
Comment |
|---|---|---|---|---|
|
|
NO |
|
None |
|
|
NO |
|
None |
|
|
YES |
|
None |