什么是投影和选择? [英] What are projection and selection?

查看:169
本文介绍了什么是投影和选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

投影和选择有什么区别?是:




  • 投影 - >用于选择表的列;和

  • 选择--->以选择表格的行?



并分别选择垂直和水平切片?

$ p


解决方案

投影意味着选择查询应返回的列(或表达式)。



选择如果查询是



<$ p

,则表示要返回哪些行 $ p> 从foobar中选择a,b,c,其中x = 3;

那么a,b,c是投影部分,其中x = 3


What is the difference between projection and selection? Is it:

  • Projection --> for selecting the columns of table; and
  • Selection ---> to select the rows of table?

So are projection and selection vertical and horizontal slicing respectively?

解决方案

Exactly.

Projection means choosing which columns (or expressions) the query shall return.

Selection means which rows are to be returned.

if the query is

select a, b, c from foobar where x=3;

then "a, b, c" is the projection part, "where x=3" the selection part.

这篇关于什么是投影和选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆