Database NOTE
Database NOTE
DEVELOPMENT PROCESS
I. Basic concepts and definitions
- Database: organized collection of logically related data 🡪 A database may be of any size and
complexity
- Data: stored representations of meaningful objects and events
o Structured: numbers, text, dates
o Unstructured: images, video, documents
- Information: data processed to increase knowledge in the person using the data
- Metadata: data that describe the properties or characteristics of end-user data and the context
of those data 🡪 Context helps users understand data
- Graphical displays turn data into useful information that managers can use for decision making
and interpretation
- Descriptions of the properties or characteristics of the data, including data types, field sizes,
allowable values, and data context 🡪 Metadata is not data per se. Instead, it is a description of
how data is to be stored and organized into a database.
▪ Compromises in data intergrity (dữ liệu toàn vẹn) - refers to ensuring the
validity, security, and availability of a company’s data
III. Solution: The database approach
- Central repository of shared data
- Data is managed by a controlling agent
- Stored in a standardized, convenient form
- DBMS is a software system that is used to create, maintain, and provide controlled access to
user databases 🡪 DBMS manages data resources like an operating system manages hardware
resources
- Most current DBMSs are in the form of relational databases, which represent data as a
collection of tables in which all data relationships are represented by common values in related
tables. We will explore relational databases in detail throughout this course.
- Note that because all the data is shared in a central database, there is no longer the need for
separate systems and programs to maintain their own copy of the data. This reduces duplication
and increases integrity.
Physical Design Deevelop tachnoligy Program/ data Physical database design (define
and organizational structures, technology database to DBMS, physical data
specification purchases, organization, database processing
organization redesigns programs)
V. Data definitions
- Explanation of a term or fact:
o Term–word or phrase with specific meaning
o Fact–association between two or more terms
- Guidelines for good data definition
o A concise description of essential data meaning
o Gathered in conjunction with systems requirements
o Accompanied by diagrams
o Achieved by consensus, and iteratively refined
VI. Entities
- Entity – a person, a place, an object, an event, or a concept in the user environment about which
the organization wishes to maintain data
- Entity type – a collection of entities that share common properties or characteristics
- Entity instance – A single occurrence of an entity type
- An entity:
o Should be:
▪ An object that will have many instances in the database
- Strong entity:
o exists independently of other types of entities
o has its own unique identifier
o identifier underlined with single line
- Weak entity
o dependent on a strong entity (identifying owner)…cannot exist on its own
o does not have a unique identifier (only a partial identifier)
o entity box and partial identifier have double lines
- Identifying relationship: links strong entities to weak entities
VII. Guidelines for naming and defining entities
- Names:
o Singular noun
o Specific to organization
o Concise, or abbreviation
o For event entities, the result not the process
o Name consistent for all diagrams
- Definitions:
o “An X is…”
o Describe unique characteristics of each instance
o Explicit about what is and is not the entity
o When an instance is created or destroyed
o Changes to other entity types
o History that should be kept
VIII. Attributes
- Attribute–property or characteristic of an entity or relationship type
- Classifications of attributes:
o Required versus Optional Attributes
o Simple versus Composite Attribute
o Single-Valued versus Multivalued Attribute
o Stored versus Derived Attributes
o Identifier Attributes
- Required attributes: must have a value for every entity (or relationship) instance with which it is
associated
- Optional attributes: may not have a value for every entity (or relationship) instance with which it
is associated
- Composite attribute: An attribute that has meaningful component parts (attributes)
- Multivalued attributes – may take on more than one value for a given entity (or
relationship) instance
- Derived attributes– values can be calculated from related attribute values (not physically
stored in the database)
X. Modeling relationships
- Relationship Types vs. Relationship Instances
o The relationship type is modeled as lines between entity types…the instance is between
specific entity instances
- Relationships can have attributes
o These describe features pertaining to the association between the entities in the
relationship
- Two entities can have more than one type of relationship between them (multiple relationships)
- Associative Entity–combination of relationship and entity
- Relationship types and instances
- Degree of relationships:
o Degree of a relationship is the number of entity types that participate in it
▪ Unary Relationship: One entity related to another of the same entity type
- Cardianlity of relationships:
o One-to-One: Each entity in the relationship will have exactly one related entity
o One-to-Many: An entity on one side of the relationship can have many related entities,
but an entity on the other side will have a maximum of one related entity
o Many-to-Many: Entities on both sides of the relationship can have many related entities
on the other side
- Note: a relationship can have attributes of its own
- Cardianlity constraints:
o Cardinality Constraints—the number of instances of one entity that can or must be
associated with each instance of another entity
o Minimum Cardinality: If zero, then optional / If one or more, then mandatory
o Maximum Cardinality: The maximum number
- Entities can be related to one another in more than one way
- If min cardinality constraint is 2. At least two professors must be qualified to teach each course.
Each professor must be qualified to teach at least one course.
- Note that the many-to-many cardinality between entities in Figure 2-11a has been replaced by
two one-to-many relationships with the associative entity.
- This could just be a relationship with attributes…it’s a judgment call.
- Time stamp – a time value that is associated with a data value, often indicating when some
event occurred that affected the data value
- Modeling time-dependent data has become more important due to regulations such as HIPAA
and Sarbanes-Oxley. 🡪 The Assignment associative entity shows the date range of a product’s
assignment to a particular product line.
- Different modeling software tools may have different notation for the same constructs.