Test 1 Flashcards
(27 cards)
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
Syntax notation [] | {} Aa _ ... ...,
[]- used to enclose option items | used to separate items ... indicate items that may be repeated .., repeated but separated by a comma {} item grouping Aa- items specified by the end user _ default options
Issue w/ unstructured data (5)
Data inconsistencies Time Structural dependence Data redundancy Data anomalies
Relationship
Describes an association b/w entities
Creating databases
Create a database structure
Create a table that will store end-user data
Schema
Group of database objects that are related to each other
Data types (9)
Number Char. Varchar. Date Timestamp Float Double Real Precision
Database management system (DBMS)
Electronic filling cabinet
Collection of programs that manages data, controls access, and maintains data integrity
Entity integrity
Satisfied when each row in a table has its own unique identity
2 requirements
Each value in the PK must be require
No PK value can be null
Client server model
Client - software program designed to send requests to a server.
Server- software program design to handle requests from a client