Data Modeling & Table Mapping (ISYS) Flashcards
Data modeling
process used to define data requirements needed to support the business processes within organizations
Conceptual data model
technology-independent specification about the data
(during data modeling, data requirements are initially recorded as conceptual data model)
-constructed through collab with business stakeholders
physical data model
model that is used by the organization
entity relationship diagram (ERD) method
- most common conceptual database modeling approaph
- includes three logical constructs: entities, attributes, and relationships
entities
-person, place, or thing about which an organization wishes to save information
EX: employee, state, order, and time sheet
-logical concept in the mind of the analyst that represents a category of objects that have common characteristics or attributes we want to store
attributes
-properties of entities that an organization cares about
EX: color, employment date, name, and SS number
-represents a fact that an organization wants to store for eacj instance of an entity
-EX: ID number first name, last name, birth date, employment date
relationships
- verbs that describe how entities are related to each other
- entity relationship entity phrase is called a “relationship entity pair” (bidirectional)
instance
- single occurrence of the object that correspond to a specific entity
- when a conceptual database is mapped to a physical database, a separate table is typically created to represent each entity, each record within the table represents once instance
cardinality
- how many instances in one table can be related to one or more instances of related entity
- -specification of the maximum number of instances of one entity can be related to the number of instances of another entity
one-to-one (1:1)
an instance of entity A can relate to one and only one instance of B and vice versa
EX: one wife has one husband
2 types: mandatory-participation relationships and optional-participation relationship
one-to-many (1:M)
one instance of entity A can relate to one or many instances of entity B, but an instance of entity B can only relate to instance A
EX: mother has many children, children have only 1 mother
-put the primary key from “one” side as a foreign key in the table on the “many” side of the relationship
many-to-many (M:M)
an instance of entity A can relate to one or more instances of entity B while instances of B can relate to one or more instances of entity A
EX: uncle has many nephews, nephews have many uncles
- to implement the relationship link for many-to-many cardinality, we need to create a new Relationship (intersection) table
- the primary keys in the relationship table are the primary keys of all the entities participating in the relationship
serialized instances
-each individual instance is assigned a unique identifier
EX: Cars have VIN (Vehicle Identification Number)
virtual instances
-same identifier is assigned to all the instances of that entity
EX: cereal, broom
table mapping
- ERD’s mapped to database table with primary keys and foreign keys
- foreign keys are not shown on ERD’s but implied by the cardinality of the relationships between the entities
- during table mapping, foreign keys are made explicit
key migration
rules for which primary key from one side of the relationship becomes a foreign key on the other side of the relationship based on the cardinality of the relationship
mandatory-participation 1:1 relationship
there must be one record on each side of the relationship
optional-participation 1:1 relationship
participation on one side of the relationship is optional
primary key
- uniquely identifies an instance
- for every row, the value of the key must uniquely identify that row
- the value must belong to one and only one row
simple key
key contains a single attribute
composite key
key that contains more than one attribute
semantic/natural key
key for which the possible values have an obvious meaning to the user or the data
artificial key
key for which the possible values have no obvious meaning to the user of the data
- artificial keys are used instead of semantic keys if the value of a semantic key may change or if the use of existing semantic attributes can be used to guarantee uniqueness
- to ensure a unique value for each record, an artificial key may be added as an attribute whose value is generated by the system