note3-relationalmodel

Note3-relationalmode - 1 CSc 134 Database Management and File Organization 3 Relational Data Model and Relational Database Constraints Ying Jin

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 CSc 134 Database Management and File Organization 3. Relational Data Model and Relational Database Constraints Ying Jin Computer Science Department California state University, Sacramento 2 Relational Model Concepts Relational Model presents a database as a collection of relations. Table :- Relation Row :- Tuple Column header :- attribute Name SSN Home Phone Joe Smith 307-88-2907 602-7765543 Barbara Miller 590-38-6654 422-1076031 Student Attribute Tuple 3 Relational Model- Domain Domain: A domain D in the relational model is a set of atomic values. Atomic: Each value in the domain is indivisible as far as the relational model is concerned. Domain:name, data type, format e.g. USA_Phone_numbers: A character string of the form (ddd)ddd-dddd, where each d is a numeric (decimal) digit and the first three digits form a valid telephone area code. e.g. employee_age: Possible ages of employee of a company; each must be an integer value between 15 and 80. 4 Relational Model- Relational Schema A relation Schema R(A1,A2,…An) is made up of a relation name R and a list of attributes A1,A2,…,An E.g. STUDENT(Name,ssn,phoneNumber) Domain of Ai is denoted by dom(Ai) Degree of a relation: number of attributes n of its relation schema name of the relation 5 Relational Model- relation state A relation (or relation state) of the relation schema R(A1,A2,…An) is denoted by r(R) The relation is a set of of n-tuples r={t1,t2,..tm} , where each n-tuple t is an ordered list of values: t=<v1,v2,..vn> each value vi, 1=<i<=n, is an element of dom(Ai) or is a special null value. unknown or may not apply to a tuple 6 7 Relational Model- relation state (Cont.) r(R) ⊆ (dom(A1) X dom (A2) X … X dom(An)) Tuples are unordered in a relation A relation cannot have duplicate tuples Denote cardinality (number of values) of domain D by |D|....
View Full Document

This note was uploaded on 10/26/2009 for the course CSC CSC 134 taught by Professor Jinyin during the Spring '09 term at CSU Sacramento.

Page1 / 34

Note3-relationalmode - 1 CSc 134 Database Management and File Organization 3 Relational Data Model and Relational Database Constraints Ying Jin

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

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