1.1 Relational model Flashcards
Database Model
Coceptual
Framework for database systms
3 parts of Database model
- Data Structures
- Operations
- Rules
Data Structures
Prescribe how data is organized
Operations
Manipulate Data structures
Rules
Govern Valid Data
relational model
A database model based on a tubular data structure
big data
unprecedented data volumes and rapidly changing data structures
set
unordred collection of elements enclosed in braces
Ex: {a,b,c}
tuple
Orderd collection of elements enclosed in a parentheses (also known as a row)
table
Has a n ame, a fixed tuple of columns, and a varying set of rows
Column
has a name and a data type
row
an unnamed tuple of values.
Each value corresponds to a column and belongs to the columns data type
data type
a named set of values, from which column values are drawn
select
selects a subset of rows of a table
Project
eliminates one or more columns of a table.
product
lists all combinations of rows of two tables
join
combines two tables by comparing related columns
union
selects all rows of two tables
intersect
selects rows common to two tables
difference
selects rows that appear in one table but not another
rename
changes a table name
aggregate
computes functions over multiple table rows
Relational rules
part of the relational model nad govern data in every relational database
Unique Primary Key
All tables have a primary key column, or group of columns, in which values may not repeat
unique column names
different columns of the same table have different names
no dublicate rows
no two rows of the same table have identical values in all columns
constraints
relational rules are implemented as SQL constraints and enforced by the database system