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

Distributed Database Management Systems: Lecture 5

26 4 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

Thông tin cơ bản

Định dạng
Số trang 26
Dung lượng 70,27 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Distributed Database Management Systems: Lecture 5. The main topics covered in this chapter include: data model; legacy data models; a set of tools/constructs used to model a database; record/semantic; relational data model; primary key;...

Trang 1

Distributed Database Management System

Lecture 05

Trang 2

Virtual University of Pakistan 2

Data Model

• A set of tools/ constructs

used to model a database

• Record/Semantic

Trang 3

Virtual University of Pakistan 3

Legacy Data Models

• Hierarchical

• Network

• Relational

Trang 4

Virtual University of Pakistan 4

Relational Data Model

• Two major Strengths

• Three Components

• Relational databases based

on relational Data Model

Trang 5

Virtual University of Pakistan 5

• A relation R defined over

domains D1, D2, …., Dn is a set of n-tuples, <d1, d2, …,

dn> such that <d1 D1……,

dn Dn

Trang 6

Virtual University of Pakistan 6

Schemes in RDB

• EMP(eNo, eName, eTitle,

eSal, pNo, eResp, pDur)

• PROJ(pNo, pName, bud)

Trang 7

Virtual University of Pakistan 7

• Each of the attribute in these

two relations has a domain, like…

• Domains need not to be

distinct

Trang 8

Keys

Trang 9

Virtual University of Pakistan 9

• Minimum nonempty subset

of a relation whose values uniquely identify each tuple

in relation

Primary Key

Trang 10

Virtual University of Pakistan 10

• The superset of the key is

super key, like…

• We also have candidate,

alternate, secondary, foreign

Trang 11

Table

Trang 12

Virtual University of Pakistan 12

• Relation represented in a two

dimensional form

pBud pName

pNo

PROJ

eDur eResp

pNo eSal

eTitle eName

eNo

EMP

Trang 13

Virtual University of Pakistan 13

eDur eResp

pNo eSal

eTitle eName

eNo

12 7 12 15 10 10

Work Mangr Cons Cons Cons Mangr

P1 P2 P1 P1 P2 P3

500 700 700 850 700 900

Supr Desin Prog Eng Prog Anlyst

Naeem Rahila Narjis Aslam Hafeez Liaqat

Trang 14

Virtual University of Pakistan 14

• After defining a relation’s

scheme, it is populated

• Tuples are rows and

attributes are cols

Trang 15

Virtual University of Pakistan 15

• Attributes get values from

same domain

• Can have NULL value,

but…

Trang 16

Virtual University of Pakistan 16

Normalization

Step-by-step reversible process to produce

anomalies free smarter tables

Trang 17

Virtual University of Pakistan 17

• Anomalies Types….

• Major step is decomposition

• Universal Relation approach

Trang 18

Virtual University of Pakistan 18

• Three Normal Forms

• Lossless decomposition

• Dependency preservation

Trang 19

Virtual University of Pakistan 19

Trang 20

Virtual University of Pakistan 20

Dependencies

A relation R defined on

attributes A(A1, A2, …., An), if

X A, Y A, if for each value of X

Trang 21

Virtual University of Pakistan 21

there is a unique value in Y,

then X functionally determines

Y, X  Y

Trang 22

Virtual University of Pakistan 22

• If X Y and there is a Z X

and ZY, then X partially

determines Y or Y is partially dependent on X

Trang 23

Virtual University of Pakistan 23

A relation R defined on

attributes A(A1, A2, …., An),

if X A, Y A, Z A, if for each value of X, there is

Trang 24

Virtual University of Pakistan 24

there is unique value of (Y,Z)

pair and Z depends only on X then X multidetermines Z,

X Z

Trang 25

Virtual University of Pakistan 25

Trang 26

Virtual University of Pakistan 26

• 1NF, attributes have only

atomic values

• 2NF, there are no partial

dependencies

• 3NF, for each XY where Y is

not in X, either X is a superkey

of R or Y is prime attribute

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

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

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

TÀI LIỆU LIÊN QUAN