Relational Data Model
Relational Data Model
ATTRIBUTE
One column named for one relation Also known as field in MS Access table
TUPLE
One row in one relation Also known as one record in MS Access table
CARDINALITY
Number of tuple of one relation
DOMAIN
One set values for one or more attributes Each attributes in relation database is a definition for domain A domain is simply a data type
DEGREE
Number of attributes which belongs by table
RELATION or table
A relation is defined as a set of tuples that all have the same attributes. This is usually represented by a table, which is organized into rows and columns. In a relational database, all of the data stored in a column should be in the same domain. In practice this means that values stored in a single column must all be of the same data type and conform to the same constraints.
DEGREE of relation
the degree of a relation is the number of attributes in the table
DEGREE of relation
UNARY
COURSE(Subject)
BINARY
PERSON(Name, Address)
TERNARY
RELATION SCHEMA
SYNTAX:Relation Name(attribute-1, attribute-2,attribute-n); EXAMPLE :EMPLOYEE(EmpID, EmpName, Address, BranchNO); BRANCH(BranchNO, Address, TelNO, FaxNO);
RELATIONAL ALGEBRA
DEFINITION
Is a data manipulation language that provides a set of operators for manipulating one or two files
USAGE
Retrieving horizontal subset of data from relation (certain rows) Retrieving vertical subset of data from relation (certain columns) joining relations on foreign keys
Acts on two relations and produces the set of tuples from the first relation that do not exist in the second relation
DIFFERENCE
PRODUCT
The Cartesian product of two relations is a join that is not restricted by any criteria, resulting in every tuple of the first relation being matched with every tuple of the second relation
PROJECT
SELECT
Operation retrieves tuples from a relation, limiting the results to only those that meet a specific criteria
JOIN
INTERSECT
THE END