Chapter31

Chapter31 - CSIS0278A CSIS0278A ManagementSystems...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CSIS0278A CSIS0278A Introduction to Database  Introduction to Database  Management Systems Management Systems Lecture 3: Relational Model  Part 1 Dr. Reynold Cheng Based on the Ch. 2 notes of “Database System Concepts” by A.  Shing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
DB030:2 Overview Overview Structure of Relational Databases Relational Algebra Extended Relational Algebra Operations Operations on Modification of Databases
Background image of page 2
DB030:3 Relational Model Relational Model Models DB as  mathematical relations A relation is a table-like structure Each relation has a  name . A column represents an  attribute  (or field) A row represents a  tuple  (or a record) which  has a value in each attribute.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
DB030:4 An Example Relation An Example Relation All data in a relational database is stored in a  collection of table-like  relations Data in different relations are related through  keys What level of  abstraction are  we discussing? attributes (or columns) ... tuples (or rows)
Background image of page 4
DB030:5 Attributes Attributes Each attribute of a relation has a  name  and a set of  allowed values (the  domain  of the attribute) In relational model, attribute values are  atomic , i.e.,  indivisible multi-valued,  composite attribute values are not atomic The special value  null  is a member of every domain denote unknown or undefined values Null value causes complications in database  definitions – let us ignore null value in the moment
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
DB030:6 A 1 , A 2 , …, A n   are  attributes  includes its name and domain. R = ( A 1 , A 2 , …, A n )  is a  relation schema e.g.    Customer = (customer_name:   char(60),  customer_street: char(60),   customer_city:   char(60)) r ( R )  denotes a  relation   instance  on  R e.g., customer (Customer_schema) relation instance  is the collection of tuples of a   relation at a particular time.
Background image of page 6
DB030:7 Relation Relation We use “Relation” to denote a table-like structure in  relational model . relation = relation schema + relation instance A relation  R  indicates both its schema and instance.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
DB030:8 Relations are Unordered Relations are Unordered Since relation is a set, the order of tuples in a relation is  irrelevant In a relation, no two tuples are the same  The following tables / relation instances are the same:
Background image of page 8
DB030:9 Database Database A relational database consists of  multiple relations An enterprise contains different relations: E.g., Account :     info. about accounts Depositor : info. about which customer                                       owns which account  Customer :  info. about customers
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
DB030:10 E-R Diagram for the Banking  E-R Diagram for the Banking  Enterprise Enterprise
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2010 for the course CS 0278 taught by Professor Dr during the Spring '10 term at HKU.

Page1 / 41

Chapter31 - CSIS0278A CSIS0278A ManagementSystems...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online