Database-chap 5 Flashcards
ER Modelling
ERM model
Forms the basis of an ERD diagram
Relational schema
A textual representation of database tables, where each is described by its name followed by a list of its attributes in parenthesis
Composite attributes
It can be subdivided to yield further attributes, composed of a single attribute
Derived attributes
Attribute whose value may be calculated(derived) from other attributes(computed attributes)
Algorithm
Is an effective method for solving a problem expressed as a finite sequence of instructions. Algorithms are used for
calculation, data processing and many other fields
Advantages of storing and not storing derived attributes
Stored: Saves CPU processing cycles
Data value is readily available
Can be used to keep track of historical data
Not stored: Saves storage space
Computation always yields current value
Disadvantages of storing and not storing derived attributes
Stored: Requires constant maintenance to ensure derived value is current, especially if any values used in the calculator change
Not stored: Uses CPU processing cycles
Adds coding complexity to queries
Relationship degree
Indicates no of entities or participants associated with a relationship
Recursive /Unary relationships
Exists when an association is maintained within a single entity
Relationship can exist between occurrences of the same entity set.
Naturally found within a unary relationship
Multiplicity
Refers to the number of instances of one entity that are associated with one instance of a related entity
Refers to both min and max number of instances
Participation
Determines whether all occurrences of an entity participate in the relationship or not
1-Mandatory
0-Optional to participate
Cardinality
Expresses the max number of entity occurrences associated with one occurrence of related entity
When is entity existence dependent?
If it can exist in the database only when it is associated with another related entity occurrence ,if it has a mandatory FK
A weak entity meets two conditions
Existence-dependent, it cannot exist w/o the entity with which it has a relationship
Has a PK that is partially /totally derived from parent entity in relationship
Weak entity
If FK is part of PK
Existence dependent
Strong relationship
Strong entity
If FK is not part part of the PK
Existence Independent
Weak relationship
Iterative process
Based on repetition of processes and procedures
Database design challenges(read further explanation)
-Database design must conform to design standards
-High processing speeds are often a top priority in database design
-Quest for timely information might be focus of database design
Design standards
-Guide in developing logical structures that minimize data redundancies
-Minimize chance of anomalies occurring
-Avoiding nulls
-Govern the presentation of all components with the database design
-Needed to formulate a proper design process ,evaluate existing design and trace the widely local impact of changes in design
Processing speeds
-Needed for large numbers of transactions
-Minimal access times through minimizing the number and complexity of logically desirable relationships
Information requirements
Complex information requirements may dictate data transformations ,and they may expand the no. of entities and attributes within the design
UML notation
-Top part is used to name the entity
-Middle part is used to name and describe the attributes
-The bottom part is used to list the methods(are usually used only when designing object-relational/OOD models)
Why does ERM use identifiers?
To uniquely identify each entity instance (underlined in the ERD)
Weak relationship
Also known as non-identifying relationship, exists if the PK of the related entity does not contain a PK component of the parent entity