Upload
rosa-maria-herrera-garcia
View
4
Download
0
Embed Size (px)
DESCRIPTION
ejemplos Algebra Relacional
Citation preview
Presentacin de PowerPoint
10 Ejemplos de Algebra RelacionalMarvin Roldan Ortiz2012114108PROYECCIONMostrar el Name y el CostRate de la tabla LocationSELECT Production.Location.Name, Production.Location.CostRate FROM Production.Location 14 filas
Mostrar el Name y CatalogDescription de la tabla Product Model SELECT Production.ProductModel.Name, Production.ProductModel.CatalogDescription FROM Production.ProductModel 128 filas
Mostrar el Name y ProductSubcategoryID de la tabla ProductSubcategory SELECT Production.ProductSubcategory.Name, Production.ProductSubcategory.ProductSubcategoryID FROM Production.ProductSubcategory 37 filas
SELECCIONMostrar el Name,CostRate donde Availability sea igual 120 select Production.Location.Name, Production.Location.CostRate, Production.Location.Availability from Production.Location where Production.Location.Availability = 120 4 filas
Mostrar el Name y el SubcategoryID donde esta ultima sea igual a 1 select Production.ProductSubcategory.Name, Production.ProductSubcategory.ProductCategoryID from Production.ProductSubcategory where ProductCategoryID = 1 3 filas
Mostrar el Name y el Quantity donde el ProductID sea igual a 1select Production.ProductInventory.ProductID, Production.ProductInventory.Quantityfrom Production.ProductInventorywhere ProductID = 1 3 filas
PRODUCTO CARTESIANOMostrar la tabla resultante de las tablas Product y ProductModel
Select *From Production.Product, Production.ProductModelWhere Product.ProductModelID = Production.ProductModel.ProductModelID 295 filas
Mostrar el ProductCategoryID y el Name de la tabla resultante a la Union de ProductCategoryID y ProductSubcategory
Select ProductCategory.ProductCategoryID, Production.ProductSubcategory.NameFrom Production.ProductCategory, Production.ProductSubcategoryWhere Production.ProductCategory.ProductCategoryID =ProductSubcategory.ProductCategoryID37 filas
REUNION NATURALMostrar la tabla resultante entre ProductSubCategory y ProductCategory select * from Production.ProductCategory join Production.ProductSubcategory On Production.ProductCategory.ProductCategoryID =ProductSubcategory.ProductCategoryID 37 filas
Mostrar el Name de la tabla resultante entre CountryRegion de la categoria person y CountryRegionCurrency de la categoria SalesSelect Person.CountryRegion.Name from Person.CountryRegion Join Sales.CountryRegionCurrency On Person.CountryRegion.CountryRegionCode = Sales.CountryRegionCurrency.CountryRegionCode 109 filas