1. Trang chủ
  2. » Công Nghệ Thông Tin

Distributed Database Management Systems: Lecture 7

13 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Distributed Database Management System

  • Relational Data Languages

  • Slide 3

  • Slide 4

  • Slide 5

  • Slide 6

  • Projection

  • Union

  • Set Difference

  • Cartesian Product

  • Intersection

  • Theta Join

  • Natural Join

Nội dung

Distributed Database Management Systems: Lecture 7. The main topics covered in this chapter include: relational data languages; relational calculus based, non-procedural, user only mentions the relationships among the data; cartesian product;...

Distributed Database Management System Lecture Relational Data Languages • Two Categories • Relational Algebra based, procedural, user is to specify in terms of certain operations, how result is to be obtained • Relational Calculus based, nonprocedural, user only mentions the relationships among the data Virtual University of Pakistan • Relational Algebra based, Procedural • Relational Calculus based, NonProcedural • Relational Algebra consists of Five basic operations – Selection, Projection, Union, Set difference and Cartesian Product Virtual University of Pakistan • Five others – Intersection, -join, natural join, semi-join and quotient – Unary and Binary ops – Union Compatibility • A horizontal subset (RELATION) PREDICATE • Pred is based on first- order predicate calculus Virtual University of Pakistan • Symbol alphabet 1.Var, constraints, functions, predicate symbols 2.Parentheses 3.Logical connectors 4.Quantifiers Virtual University of Pakistan Example (EMP) dep = ‘D01’ (dep = ‘D01’) ^ sal < 20000 Virtual University of Pakistan (EMP) Projection • Produces vertical subset of a relation a1, a2, , ak (R) name, adrs (STD) Virtual University of Pakistan Union • • • All tuples in both the relations Duplicate tuples rem Used to insert new records into relation Virtual University of Pakistan Set Difference • (R-S) is the set of tuples in R that are not in S • Used for delete op Virtual University of Pakistan Cartesian Product •RxS • Each tuple of one relation is concatenated with each of other Virtual University of Pakistan 10 Intersection • Set of tuples that belong to both relations • R S = R – (R-S) Virtual University of Pakistan 11 Theta Join • A derivative of RxS R S= (R x S) F • Predicate here involves attributes from both tables Virtual University of Pakistan 12 Natural Join • An equi-join over two relations R S A • Attribute name need not to be same Virtual University of Pakistan 13

Ngày đăng: 05/07/2022, 13:32

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN