O catálogo de dados do SDSS é armazenado em um gerenciador comercial de banco de dados relacional (DBMS) - Microsoft SQL Server. Os dados são, portanto, organizados em diversas tabelsas de duas dimensões. As tabelas e as relações de umas com as outras são denominadas como schema no jargão de banco de dados.
Há 3 tipos diferentes de dados nas tabelas - dados de imagens estão no grupo photo de tabelas, dados de espectroscopia e tiling estão nas tabelas spectro e outros dados como documentação ou outras informações sobre os dados de imagens e de espectros, ou seja, metadados, estão nas tabelas meta. Algumas tabelas são também criadas especificamente por rapidez ou conveniência, por exemplo a tabela SpecPhotoAll, que contém uma junção pré-computada de campos relevantes das tabelas PhotoObjAll e SpecObjAll.
As tabelas importantes estão descritas abaixo, juntamente com as visualizações (views) que estão definidas atualmente em cada tabela. Uma visualização (view) é um subconjunto da tabela correspondente que pode ser usado ao invés da tabela - em outras palavras, é uma tabela virtual. Uma visualização é geralmente mais rápida do que se usar a tabela básica, já que carrega apenas um subconjunto dos objetos, mas mais importante, as visualizações que definimos nas tabelas selecionam apenas os objetos que são importantes para a pesquisa científica, deixando de fora objetos não-científicos como céu, QA ou observações defeituosas. Assim, ainda que listamos as tabelas básicas abaixo, na imensa maioria dos casos, você deve usar as visualizações definidas nas tabelas ao invés das próprias tabelas, por exemplo, use as visualizações PhotoObj e SpecObj para pesquisas científicas ao invés das tabelas PhotoObjAll e SpecObjAll.
Há dois conjuntos principais de dados no servidor do catálogo do SDSS -
os conjuntos BEST e TARGET que estão armazenados em bancos de dados separados. Cada um
contém diferentes re-processamentos dos mesmos dados brutos:
Os dois bancos de dados possuem o mesmo schema (tabelas), mas os dados são diferentes.
O banco de dados BESTDR7 também contém os dados espectroscópicos e de tiling,
enquanto que o banco de dados TARGDR7 contém apenas dados de imagem. A imensa
maioria das buscas são feitas no BESTDR7.
Há dois outros bancos de dados atualmente no CAS - RC3 e Stetson. Eles contêm fotometria dos objetos dos conjuntos de dados RC3 e Stetson para os quais o SDSS possui medidas. Cada banco de dados contém uma única tabela - a tabela PhotoObj no RC3 e a tabela Stetson em Stetson.
Para escolher um banco de dados além do padrão BESTDR7 no seu query, você deve especificá-lo como <dbname>..<tablename>, por exemplo, TARGDR2..PhotoObj, RC3..PhotoObj, Stetson..Stetson, etc. Uma maneira rápida de obter os campos das tabelas RC3 e Stetson é digitar:
SELECT TOP 1 * FROM RC3..PhotoObj SELECT TOP 1 * FROM Stetson..StetsonPor favor, dê uma olhada na página de Introdução a SQL para ajuda adicional com relação a queries em SQL.
Nós construímos um esquema de índice espacial chamado Hierarchical Triangular Mesh (HTM) que decompõe espacialmente a regiao do céu que é coberta pelos dados do SDSS e permite buscas espaciais muito mais rápidas dos dados através de "recortes" em coordenadas.
Além do HTM, que é um esquema geral de indexação para dados espaciais multidimensionais, o próprio DBMS tem a capacidade de definir índices para buscas rápidas em cada tabela. Nós definimos indices em todas as tabelas principais.
Um índice é uma representação, em forma de "árvore", de um subconjunto das colunas de uma tabela que permite buscas muito mais rápidas (em comparação com escaneamentos sequenciais dos dados da tabela) quando restrições envolvendo estas colunas estao presentes no query. Todas as tabelas possuem um índice na chave primária (primary key, identificador único da linha), mas as tabelas maiores possuem índices além do índice da chave primária. EM todas, há 3 tipos de índices:
View Name | Contents | Description |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoAuxAll | View for PhotoAuxAll for backward compatibility with DR5. | It selects the required columns from PhotoObjAll. |
PhotoFamily | These are in PhotoObj, but neither PhotoPrimary or Photosecondary. | These objects are generated if they are neither primary nor secondary survey objects but a composite object that has been deblended or the part of an object that has been deblended wrongfully (like the spiral arms of a galaxy). These objects are kept to track how the deblender is working. It inherits all members of the PhotoObj class. |
PhotoObj | All primary and secondary objects in the PhotoObjAll table, which contains all the attributes of each photometric (image) object. | It selects PhotoObj with mode=1 or 2. |
PhotoPrimary | These objects are the primary survey objects. | Each physical object on the sky has only one primary object associated with it. Upon subsequent observations secondary objects are generated. Since the survey stripes overlap, there will be secondary objects for over 10% of all primary objects, and in the southern stripes there will be a multitude of secondary objects for each primary (i.e. reobservations). |
PhotoSecondary | Secondary objects are reobservations of the same primary object. |
Index Type | Key or Field List |
primary key | objID |
foreign key | Field(fieldID) |
covering index | mode, cy, cx, cz, htmID, type, flags, status, ra, dec, u, g, r, i, z, rho |
covering index | htmID, cx, cy, cz, type, mode, flags, status, ra, dec, u, g, r, i, z, rho |
covering index | htmID, run, camcol, field, rerun, type, mode, flags, status, cx, cy, cz, g, r, rho |
covering index | field, run, rerun, camcol, type, mode, flags, rowc, colc, ra, dec, u, g, r, i, z |
covering index | fieldID, objID, ra, dec, r, type, status, flags |
covering index | SpecObjID, cx, cy, cz, mode, type, flags, status, ra, dec, u, g, r, i, z, rho |
covering index | cx, cy, cz, htmID, mode, type, flags, status, ra, dec, u, g, r, i, z, rho |
covering index | run, mode, type, status, flags, u, g, r, i, z, Err_u, Err_g, Err_r, Err_i, Err_z |
covering index | run, camcol, rerun, type, mode, status, flags, ra, dec, fieldID, field, u, g, r, i, z |
covering index | run, camcol, field, mode, parentID, q_r, q_g, u_r, u_g, isoA_r, isoB_r, fiberMag_u, fiberMag_g, fiberMag_r, fiberMag_i, fiberMag_z |
covering index | run, camcol, type, mode, cx, cy, cz |
covering index | ra, [dec], type, mode, flags, u, g, r, i, z, psfMag_u, psfMag_g, psfMag_r, psfMag_i, psfMag_z, primTarget |
Index Type | Key or Field List |
primary key | objID |
foreign key | PhotoObjAll(objID) |
foreign key | Field(fieldID) |
covering index | mode, cy, cx, cz, htmID, type, flags, status, ra, [dec], modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, [size] |
covering index | htmID, cx, cy, cz, type, mode, flags, status, ra, [dec], modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, [size] |
covering index | htmID, run, camcol, field, rerun, type, mode, flags, status, cx, cy, cz, modelMag_g, modelMag_r, probPSF |
covering index | field, run, rerun, camcol, type, mode, flags, ra, [dec], modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z |
covering index | fieldID, objID, ra, [dec], modelMag_r, type, status, flags |
covering index | SpecObjID, cx, cy, cz, mode, type, flags, status, ra, [dec], modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, [size] |
covering index | cx, cy, cz, htmID, mode, type, flags, status, ra, [dec], modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, [size] |
covering index | run, mode, type, status, flags, modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, modelMagErr_u, modelMagErr_g, modelMagErr_r, modelMagErr_i, modelMagErr_z |
covering index | run, camcol, field, rerun, type, mode, status, flags, ra, [dec], fieldID, modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z |
covering index | ra, [dec], type, mode, flags, modelMag_u, modelMag_g, modelMag_r, modelMag_i, modelMag_z, psfMag_u, psfMag_g, psfMag_r, psfMag_i, psfMag_z, primTarget |
Index Type | Key or Field List |
primary key | segmentID |
foreign key | Chunk(chunkId) |
foreign key | StripeDefs(stripe) |
Index Type | Key or Field List |
primary key | fieldID |
foreign key | Segment(segmentID) |
covering index | field, camcol, run, rerun |
covering index | run, camcol, field, rerun |
Index Type | Key or Field List |
primary key | chunkID |
foreign key | StripeDefs(stripe) |
Index Type | Key or Field List |
primary key | objID, bin, band |
foreign key | PhotoObjAll(objID) |
Index Type | Key or Field List |
primary key | fieldID, bin, band |
foreign key | Field(fieldID) |
Index Type | Key or Field List |
primary key | objID, NeighborObjID |
foreign key | PhotoObjAll(objID) |
Index Type | Key or Field List |
primary key | objID1, objID2 |
foreign key | PhotoObjAll(objID) |
foreign key | MatchHead(objid) |
covering index | matchHead |
Index Type | Key or Field List |
primary key | objID |
foreign key | PhotoObjAll(objID) |
Index Type | Key or Field List |
primary key | plateID |
foreign key | TileAll(tile) |
covering index | htmID, ra, dec, cx, cy, cz |
View Name | Contents | Description |
SpecObj | A view of Spectro objects that just has the clean spectra. | The view excludes QA and Sky and duplicates. Use this as the main way to access the spectro objects. |
Index Type | Key or Field List |
primary key | specObjID |
foreign key | PlateX(plateID) |
covering index | htmID, ra, dec, cx, cy, cz, sciencePrimary |
covering index | BestObjID, objType, objTypeName, sciencePrimary, specClass, htmID, ra, dec, fiberMag_u, fiberMag_g, fiberMag_r, fiberMag_i, fiberMag_z |
covering index | specClass, zStatus, zWarning, z, sciencePrimary, primTarget, secTarget, plateId, bestObjID, targetObjId, htmID, ra, dec |
covering index | targetObjID, objType, objTypeName, sciencePrimary, specClass, htmID, ra, dec, fiberMag_u, fiberMag_g, fiberMag_r, fiberMag_i, fiberMag_z |
covering index | ra, [dec], specClass, plate, tile, z, zErr, zConf, fiberMag_r, primTarget, sciencePrimary, plateID, bestObjID |
View Name | Contents | Description |
SpecLine | A view of SpecLines objects that have been measured | The view excludes those SpecLine objects which have category=1, thus they have not been measured. This is the view you should use to access the SpecLine data. |
Index Type | Key or Field List |
primary key | specLineID |
foreign key | SpecObjAll(specObjID) |
covering unique index | specobjID, specLineID |
Index Type | Key or Field List |
primary key | specLineIndexID |
foreign key | SpecObjAll(specObjID) |
covering unique index | specobjID, speclineindexID |
View Name | Contents | Description |
Tile | A view of TileAll that have untiled=0 | The view excludes those Tiles that have been untiled. |
Index Type | Key or Field List |
primary key | tile |
foreign key | TilingRun(tileRun) |
covering unique index | tileRun, tile |
covering index | htmID, racen, deccen, cx, cy, cz |
View Name | Contents | Description |
TiledTarget | A view of TiledTargetAll objects that have untiled = 0 | The view excludes those TiledTarget objects that have been untiled. |
Index Type | Key or Field List |
primary key | targetID, tile |
foreign key | TileAll(tile) |
covering unique index | tile, targetID |
covering index | htmID, ra, dec, cx, cy, cz, objtype, untiled |
covering unique index | objType, targetID, tile |
View Name | Contents | Description |
TilingBoundary | A view of TilingGeometry objects that have isMask = 0 | The view excludes those TilingGeometry objects that have isMask = 1. See also TilingMask. |
TilingMask | A view of TilingGeometry objects that have isMask = 1 | The view excludes those TilingGeometry objects that have isMask = 0. See also TilingBoundary. |
Index Type | Key or Field List |
primary key | tilingGeometryID |
foreign key | TilingRun(tileRun) |
foreign key | StripeDefs(stripe) |
View Name | Contents | Description |
SpecPhoto | A view of joined Spectro and Photo objects that have the clean spectra. | The view includes only those pairs where the SpecObj is a sciencePrimary, and the BEST PhotoObj is a PRIMARY (mode=1). |
Index Type | Key or Field List |
primary key | specObjID |
foreign key | SpecObjAll(specObjID) |
covering index | objID, sciencePrimary, specClass, z, targetObjid, targetId |
covering index | targetObjID, sciencePrimary, specClass, z, objid, targetId |
covering index | targetID, sciencePrimary, specClass, z, objid, targetObjId |