Test 1 Flashcards
Relationships
One to one
One to many
Many to many
Connectivity vs cardinality
Co.- describes the relationship classification
Card.- expresses min.&max. # of entity occurrences associated with one occurrence of related entity
DIKW hierarchy
Data:raw
Information : data in context
Knowledge: application of data
Wisdom: evaluated understanding
What is stored ?
End-user data - raw facts that are of interest to the user
Metadata - data about data - names of fields and tables in which data are stored
Parent and child
Relationship b/w tables the table whose PK is being referenced is the parent table. The table referencing the PK w/ a foreign K is the child table.
Altering tables
Add , drop & modify
Add column Add column_name datatype options Modify changes the column characteristic Modify (column_name[options]) Drop deletes table/column Drop column column_name
Data modeling
Graphical abstraction of real world
Notation: crows notation
Entity vs attribute
En. - is an object about which data will be stored; it is distinct from other objects
At.- is a characteristic of an entity
Relationship participation
Op. - one entity occurrence doesn’t require corresponding entity occurrence in particular relationship
Mp.- one entity occurrence corresponding entity occurrence in particular relationship
Primary key
Composition key
Candidate key
PK- an attribute of attributes that uniquely identifies any given row
Ck - FK is a key composed of more than 1 attribute
Cand. Key- is any field that can be used as a PK
Create table
Unique
Check
Default
,=,>=,<=,IN(values)
Unique- means that there can be no duplicate values in this field
Check- can be used to require values in certain field to meet specific criteria
Default- can be used to assign a default value to a field
Classification
Multiuser vs single user
Centralized vs distributed
Operational vs analytical
Referential integrity
Foreign K ensures the condition in which every reference to a row in a parent entity by a row in child entity is valid
A child table cannot reference a nonexistent parent
A parent cannot be deleted with a reference in a child table.
SQL
Structured query language
SQL functions fit 2 categories
Data def. Lang. & manipulation Lang.
Relational model
Entities- table
Attributes- fields
Instances-rows
Relationship - primary &foreign key