Exam 2 Flashcards
Popular DBMS systems?
DB2 from IBM Oracle from Oracle Sybase DBMS from SAP SqlServer from Microsoft MySql (Open Source) PostgreSQL (Open Source)
What is a flat file?
Each relation in the database has a flat structure
What is a table?
Each row in the table represents a collection of related data values
What does a tuple represent in a database?
a row
What is an attribute in a database?
a column header
What does a table represent?
a relation
What is a domain?
A domain D is a set of atomic values
What is an atomic value?
Each value in the domain is indivisible
Example domains?
Usa_phone_numbers: the set of 10 digit phone numbers valid in the United States Academic_department_names: The set of academic department names in a university (Computer Science, Economics, Physics)
What is a data type / format?
data type for the domain: Usa_phone_numbers can be declared as 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
What is relation schema?
Made up of a relation name R and a list of attributes A1, A2, … An Used to describe a relation Denoted as R
Attribute in relation schema
Each attribute Ai is the name of a role played by a domain D in the relation schema R
Domain in relation schema
D is called the domain of Ai and is denoted by dom(Ai)
what is a degree (arity)
Number of attributes n in the relation schema
Relation of degree 7 example:
STUDENT(Name, Ssn, Home_phone, Address, Office_phone, Age, Gpa) Also sometimes written as… STUDENT(Name: string , Ssn: string , Home_phone: string , Address: string , Office_phone: string , Age: integer , Gpa: real )
What is a Relation state?
A relation state of schema R(A 1 , A 2 , … , A n ) is a set of tuples: r = {t 1 , t 2 , … , t m } Also called relational intention or relation extension:
Cartesian product (x)
Specifies all possible combinations of values from the underlying domains
Current relation state
Only the valid tuples that represent a particular state of the real world
Subset (⊆)
A smaller part of a larger set
Cardinality
Total number of values in a domain
Ordering of tuples in a relation. How does that work?
Elements in a set have no order. Tuples in a mathematical relation have no order However in programming, tuples do have an order There is no preference for one ordering over another
Alternative definition of a relation
Each tuple ti is a mapping from one R to D. D is a union of the attribute domains Tuple is a set of attribute value pairs Tuples list has no order
Self describing data
When a description of each value (like the attribute name) is included in the tuple
Flat relational model
Each value in a tuple is an atomic value that is not divisible Composite and multivalued attributes are now allowed Also called first normal form assumption