Tutorials
Ajuda do DR7
 Arquivos: Introdução
 Descrições das Tabelas
 Navegador Schema
 Glossário
 Algoritmos
 Introdução a SQL
 Guia Formulário Busca
 Limites de Busca
 Como Fazer
     - Busca
     - Gráfico
 Perguntas Frequentes
 API
 sdssQA
 Download
 Sites do SkyServer
 Página de Tráfego
 Navegadores Web
 Contatar Help Desk (em inglês)
Busca
 Back
 1. Introdução
 2. Um Query Simples
 Exercício
 3. Usualmente Buscada
 4. Mais Exemplos
 Exercício
 5. Multiple Tables
 Practice
 6. Aggregate Fcns.
 7. Group By
 8. Order By
 Practice
 9. Views
 10. Functions
 Practice
 11. Conclusion

Views

Look again at the left column of the Schema Browser. You already know what a table is - a storehouse for data of the same type. But what about those other terms?

A view is a virtual table created by combining records from real tables. The records that make up a view remain in their original tables, but they can be accessed and searched through the view.

What does this mean for you? If you're a database programmer, the difference is crucial. For the rest of you, the difference is... nothing. For the purpose of searching for data, a view is a table, and a table is a view. You can search views just like tables, by listing them in the from block.

In fact, many of the so-called "tables" you have been using are actually views! The specObj "table" is actually a view created from the specObjAll table, which contains both good and bad spectra. The PhotoPrimary, Star, Galaxy, and Unknown databases are all views created from the PhotoObjAll table. You've been using these views all along!

Try searching the same area of sky using the SpecObjAll table and the SpecObj view, or the PhotoObjAll table and Star, Galaxy, or Unknown views. What differences do you see?

One particularly important view is the SpecPhoto view, which contains photometric and spectroscopic information on the same objects. Using SpecPhoto is just like doing a join between SpecObj and PhotoObj, but SpecPhoto is easier to use, and your queries will run faster.

When you are ready to move on, click Next to learn about functions.


Formato HTML XML CSV

Digite o seu query SQL na caixa de texto. A busca é limitada em 90 segundos e 1000 linhas.