DBAS Week 2

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 70

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

71 Terms

1

Conceptual Data Modelling

  • Definition (What & Purpose)

  • What: Process of abstracting reality as a particular business sees it — into well defined & concrete entities

  • Purpose: Captures the nature & relations among data

New cards
2

Business Rules

  • What

  • Purpose/Significance

What

  • Statements that define or constrain some aspect of the business

  • Derived from the business’ policies, procedures, events, and/or functions

  • Automated through DBMS software

Purpose

  • Asserts business structure

  • Influences business behaviour

New cards
3

Business rules are ________ through DBMS software.

Business rules are automated through DBMS software.

New cards
4

T or F: Business rules are expressed in familiar terms to end users.

True

New cards
5

A good business rule is…

Hint: “Devin Pulls All Chicks Especially Dumb Blondes”

D = Declarative — What, not how

P = Precise — Clear & agreed-upon meaning

A = Atomic — One single statement

C = Consistent — Internally & externally

E = Expressible — Structured, in a natural language

D = Distinct — Non-redundant

B = Business-Oriented — Meaningful & understandable by business people

New cards
6

Define the following:

(a) Entity

(b) Entity Type

(c) Entity Instance

(a) Entity

  • Anything an organization wants to store data about

  • A person, place, object, event, or concept

(b) Entity Type

  • Collection of entities that share common properties or characteristics

  • Typically corresponds to a table

(c) Entity Instance

  • A single occurrence of an entity type

  • Typically corresponds to a single row in a table

New cards
7

Entity instances would be the actual ______________ in the final database table that implements an __________.

Entity instances would be the actual records (or rows) in the final database table that implements an entity type.

New cards
8

(a) Relationship Instance

(b) Relationship Type

(a) Relationship Instance

  • Link b/w entities

  • Corresponds to primary-key & foreign-key equivalencies in related tables

(b) Relationship Type

  • Category of relationship

  • Link b/w entity types

New cards
9

Define the following:

(a) Attribute

(b) Required Attribute

(c) Optional Attribute

(a) Attribute

  • Property or characteristic of an entity type or relationship type

  • Typically corresponds to a field in a table

(b) Required Attribute

  • Attribute must have a value for every entity (or relationship) instance it’s associated with.

(c) Optional Attribute

  • Attribute doesn’t have to have a value for every entity (or relationship) instance it’s associated with.

New cards
10

List all of the different types of classifications of attributes.

  • Required versus Optional

  • Simple versus Composite

  • Single-Valued versus Multivalued

  • Stored versus Derived

  • Identifier

New cards
11

Describe the Basic ER Diagram Notation

Entities

  • Strong entity —> Represented as a rectangle, with square/sharp edges

  • Weak entity —> Represented as a rectangle, with sharp edges BUT two lines as a border

  • Associative entity —> Represented as a rectangle, with rounded edges

Entity Name

  • Written in ALL CAPS

  • Positioned at top centre of entity rectangle

Attribute

  • Listed under entity name

  • Unique Identifier —> underlined once

  • Partial Identifier —> underlined twice

  • Optional attribute —> *no special notation

  • Derived attribute —> enclosed in square brackets

  • Multivalued attribute —> enclosed in curly brackets

  • Composite attribute —> attribute name followed by a comma separate listed enclosed in brackets

Relationship Degrees

Unary Relationship

  • Involves 1 entity type

  • Relationship line emerges from one place on entity, then circles back connects to a diff place on entity

Binary

  • Involves 2 entity types

  • Relationship line connects from one entity directly to another

Ternary

  • Involves 3 entity types

  • Relationship line emerging from each entity & joins together at a central point

  • (see attached image)

Relationship Cardinalities

  • One to one

  • One to one, and only one (mandatory one)

  • One to zero or one (optional one)

  • One to many

  • One to one or many (mandatory many)

  • One to zero or many (optional many)

<p><strong>Entities</strong></p><ul><li><p>Strong entity —&gt; Represented as a rectangle, with square/sharp edges</p></li><li><p>Weak entity —&gt; Represented as a rectangle, with sharp edges BUT two lines as a border</p></li><li><p>Associative entity —&gt; Represented as a rectangle, with rounded edges</p></li></ul><p></p><p><strong>Entity Name</strong></p><ul><li><p>Written in ALL CAPS</p></li><li><p>Positioned at top centre of entity rectangle</p></li></ul><p></p><p><strong>Attribute</strong></p><ul><li><p>Listed under entity name</p></li><li><p>Unique Identifier —&gt; underlined once</p></li><li><p>Partial Identifier —&gt; underlined twice</p></li><li><p>Optional attribute —&gt; *no special notation</p></li><li><p>Derived attribute —&gt; enclosed in square brackets</p></li><li><p>Multivalued attribute —&gt; enclosed in curly brackets</p></li><li><p>Composite attribute —&gt; attribute name followed by a comma separate listed enclosed in brackets</p></li></ul><p></p><p><strong>Relationship Degrees</strong></p><p>Unary Relationship </p><ul><li><p>Involves 1 entity type</p></li><li><p>Relationship line emerges from one place on entity, then circles back connects to a diff place on entity</p></li></ul><p></p><p>Binary</p><ul><li><p>Involves 2 entity types</p></li><li><p>Relationship line connects from one entity directly to another</p></li></ul><p></p><p>Ternary</p><ul><li><p>Involves 3 entity types</p></li><li><p>Relationship line emerging from each entity &amp; joins together at a central point</p></li><li><p>(see attached image)</p></li></ul><p></p><p><strong>Relationship Cardinalities</strong></p><ul><li><p>One to one</p></li><li><p>One to one, and only one (mandatory one)</p></li><li><p>One to zero or one (optional one)</p></li><li><p>One to many</p></li><li><p>One to one or many (mandatory many)</p></li><li><p>One to zero or many (optional many)</p></li></ul><p></p><img src="https://knowt-user-attachments.s3.amazonaws.com/da80b1da-4deb-4e45-9179-c408accc8405.png" data-width="100%" data-align="center"><p></p>
New cards
12

“Business rules are automated through DBMS software.”

Explain what this means.

INCOMPLETE

New cards
13

An _______________ is a special entity that is also a relationship b/w two other entities.

An associative entity is a special entity that is also a relationship b/w two other entities.

New cards
14

Relationship Degree

What: The degree of a relationship specifies the number of entity types involved.

There are…

  • Unary —> 1 entity involved in the relationship

  • Binary —> 2 entities involved in the relationship

  • Ternary —> 3 entities involved in the relationship

New cards
15

(a) Define “Relationship Cardinality”

(b) Name & describe the types of relationship cardinalities.

What: Defines the number of instances of one entity that can be associated with instances of another entity.

Types of Relationship Cardinalities:

  1. One-to-One (1:1)

    • Each instance of Entity A is related to at most one instance of Entity B, and vice versa.

  2. One-to-One (Mandatory One) (1:1)

    • Each instance of Entity A must be related to exactly one instance of Entity B.

  3. One-to-One (Optional One) (0:1)

    • Each instance of Entity A may be related to zero or one instance of Entity B.

  4. One-to-Many (1:M)

    • Each instance of Entity A can be related to multiple instances of Entity B, but each instance of Entity B is related to only one instance of Entity A.

  5. One-to-Many (Mandatory Many) (1:M)

    • Each instance of Entity A must be related to at least one instance of Entity B.

  6. One-to-Many (Optional Many) (0:M)

    • Each instance of Entity A may be related to zero or many instances of Entity B.

New cards
16

Data Names

  • What

  • Purpose/Significance

What:

  • Name assigned to data objects in a database

  • Can be the name of an entity, attribute, relationship, etc.

Purpose/Significance

  • How data object is identified in database schema

  • Data objects must be named & defined before they can be used unambiguously in a database model

New cards
17

T or F: Data objects must be named & defined before they can be used unambiguously in a database model.

True

New cards
18

A good data name is…

(Hint: Rachel’s Man Understands Relationships Can Ruin Work)

R = Related to business, not technical

M = Meaningful & self-documenting

U = Unique

C = Composed of words from an approved list

R = Repeatable

W = Written in standard syntax

New cards
19

Categorize the following into two groups:

(a) Things an entity SHOULD be

(b) Things an entity SHOULD NOT be

  • An output of the database system

  • An object that will have many instances in the database

  • A user of the database system

  • An object that will be composed of multiple attributes

  • An object that database developer needs to model

(a) Things an entity SHOULD be

  • An object that will have many instances in the database

  • An object that will be composed of multiple attributes

  • An object that database developer needs to model

(b) Things an entity SHOULD NOT be

  • An output of the database system

  • A user of the database system

New cards
20

Which of the following are NOT appropiate entities (by definition)?

  1. Employee – Represents individual employees in a company, storing attributes like EmployeeID, Name, and Department.

  2. Invoice Number – A unique number assigned to each invoice.

  3. Car Model and Year – A combination of attributes describing a car but not a distinct entity.

  4. Product – Represents goods or services sold by a business, with attributes like ProductID, Name, and Price.

  5. Phone Number – A contact detail for a person or business.

(2) Invoice Number —> This is an attribute, not an entity.

(3) Car Model & Year —> This should be part of a "Car" or "Vehicle" entity instead.

(5) Phone Number —> This should be an attribute of an entity like "Customer" or "Employee," not an entity itself

New cards
21

Define the following:

(a) Strong Entity

(b) Weak Entity

(c) Identifying Relationship

(a) Strong Entity

  • Exists independently of other entity types

  • Has its own unique identifier

(b) Weak Entity

  • Dependent on a strong entity (called its “identifying owner”)

  • Cannot exist on its own

  • Doesn’t have a unique identifier

    • Instead has a partial identifier

(c) Identifying Relationship

  • Links strong entities to weak entities

New cards
22

Describe the differences in how strong & weak entities are represented in an ER diagram.

Strong Entity

  • Single line as border for its rectangle

  • Has a unique identifier (PK) —> underlined w/ single line

Weak Entity

  • Double lines as border for its rectangle

  • Has a partial identifier —> underlined w/ double lines

New cards
23

A relationship that links strong entities to weak entities is called an ________________. And in this relationship, the weak entity is dependent on a strong entity, which is called its _______________.

A relationship that links strong entities to weak entities is called an identifying relationship. And in this relationship, the weak entity is dependent on a strong entity, which is called its identifying owner.

New cards
24

Observe the diagram of the entity-relationship below.

(a) Fill in the labels (a, b, c, d)

(b) Describe the relationship b/w EMPLOYEE & DEPENDENT

(a)

(b) INCOMPLETE

New cards
25

T or F: An entity must always contain an identifier attribute.

True

New cards
26

Simple v.s. Composite Attribute

  • Define

  • Give example

Simple — Attribute w/o sub attributes

Composite — Attribute with meaningful components (sub-attributes.

Example:

New cards
27

Single-Valued v.s. Multivalued Attribute

  • Define

  • Give example

Multivalued Attribute

  • Can have more than one value for a single entitiy

  • Example: An employee can have multiple skills

IMP NOTE! This is not the same as a composite attribute, which is an attribute made up of smaller parts (e.g., "Full Name" = First Name + Last Name).

Single-Valued Attribute

  • An attribute that has only one value for a given entity.

  • Example: An employee has one date of birth.

New cards
28

Stored v.s. Derived Attribute

  • Define

  • Give example

Derived Attribute

  • An attribute not stored in the database but calculated from other attributes.

  • Example: "Years Employed" can be calculated using (Current Date - Date Employed) instead of being stored as a separate value.

Stored Attribute

  • An attribute that is physically saved in the database.

  • It is not calculated from other attributes.

  • Example: Date of Birth of an employee is stored as it is, while Age can be calculated from it (making Age a derived attribute).

New cards
29

People often mistake or confuse the “__________” classification for an attribute with “__________” classification.

People often mistake or confuse the “multivalued” classification for an attribute with “composite” classification.

New cards
30

Identifiers are also called “____”.

Identifiers are also called “keys”.

New cards
31

Define “Identifier (key)”

New cards
32

Simple v.s. Composite Identifier

New cards
33

Candidate Identifier

New cards
34

Describe the criteria for identifiers.

New cards
35

Describe the rules for naming & defining attributes.

Attribute names should be…

  • Noun

  • Unique

  • Follow a standard format

  • Similar entities of different entity types should use the same qualifiers & classes

Attribute definitions should…

  • State what attribute is (& possibly its importance)

  • Clearly state what is & is NOT included in attribute’s value

  • Included aliases in documentation

  • State source of values

  • State if attribute value is changeable or fixed

  • Specify whether require or optional

  • State min & max number of occurrences allowed

  • Indicate relationships w/ other attributes

New cards
36

Modelling Relationships

(a) The type of relationship b/w specific entity instances is referred to as _________ and modelled as ________.

(b) T or F: Relationships can have attributes.

(c) ________ describe the features/characteristics of an association b/w entities.

(d) T or F: Two entities can have more than one type of relationship b/w them.

(e) ______________ is the combination of a relationship and entity.

INCOMPLETE

New cards
37

_______________ bridge many to many relationships.

Associative entities bridge many to many relationships.

New cards
38

Describe cardinality constraints.

Cardinality Constraints — the number of instances of one entity that can or must be associated with each instance of another entity
Minimum Cardinality

If zero, then optional
If one or more, then mandatory Maximum Cardinality
The maximum number

New cards
39

Demonstrate how to draw a unary relationship.

Example of unary relationship

New cards
40

In the diagram below, the entities have what relationship type?

Ternary relationship

New cards
41

T or F: Multivalued attributes can be represented as relationships?

True

New cards
42

The following is an example of which type of cardinality constraint?

New cards
43

The following is an example of which type of cardinality constraint?

New cards
44

The following is an example of which type of cardinality constraint?

New cards
45

T or F: The following is an example of a multiple relationship? Justify your answer.

New cards
46

T or F: The following is an example of a multiple relationship? Justify your answer.

New cards
47

In the diagram below, '“prerequisite” in the entity “COURSE” is an example of what type of attribute?

Simple multivalued attribute.

New cards
48

In the diagram below, '“Skill” in the entity “EMPLOYEE” is an example of what type of attribute?

Composite multivalued attribute.

New cards
49

In which situations should a relationship with attributes be an associative entity instead?

  • –  All relationships for the associative entity should be many

  • –  The associative entity could have meaning independent of

    the other entities

  • –  The associative entity preferably has a unique identifier, and should also have other attributes

  • –  The associative entity may participate in other relationships other than the entities of the associated relationship

  • –  Convert ternary relationships to associative entities

New cards
50

Which of the following is true about associative entities:

(a) It has attributes.

(b) It is a relationship.

(c) It’s purpose is to link other entities together in a many-to-many relationship.

All statements are true.

New cards
51

(a) Demonstrate proper denotation for a relationship w/ an attribute on an ER diagram.

(b) Demonstrate proper denotation for an associative entity on an ER diagram.

New cards
52

Describe cardinality constraints in a ternary relationship.

New cards
53

Time Stamp

  • Define

  • When does this typically occur?

  • Demonstrate example.

Def: A time value that is associated with a data value.

Often indicates when some event occurred that affects the data value.

Example:

New cards
54

ER Diagram v.s. EER Diagram

ER Diagram

  • Stands for “Entity-Relationship” Diagram

  • Contains:

    • INCOMPLETE

EER Diagram

  • Stands for “Enhanced Entity-Relationship” Diagram

  • Extends upon original ER model with additional constructs:

    • Specialization (partial & total)

    • Subtypes & Supertypes

    • Attribute Inheritance

DC

New cards
55

Compare ER & EER Diagrams

ER Diagram vs. EER Diagram

Feature

ER Diagram (Entity-Relationship Diagram)

EER Diagram (Enhanced Entity-Relationship Diagram)

Definition

A diagram that models entities, relationships, and attributes in a database.

An extension of ER diagrams that includes advanced concepts like subtypes, supertypes, and specialization/generalization.

Complexity

Basic, suitable for simpler database designs.

More detailed, used for complex data structures.

Includes Supertypes & Subtypes?

No

Yes

Includes Specialization/Generalization?

No

Yes

Use Case

Good for basic databases with clear entities and relationships.

Ideal for systems with inheritance, categories, or complex relationships.

Example:

  • ER Diagram:

    • Entities: Employee, Department, Project

    • Relationships: Employee "works in" Department

  • EER Diagram:

    • Adds subtypes: Manager, Engineer (subtypes of Employee)

    • Uses specialization: Employee can be either a Manager or Engineer

INCOMPLETE/DC

New cards
56

Define the following:

(a) Subtype

(b) Supertype

(c) Attribute Inheritance

(a) Subtype

  • Sub-group of entities that are a more specific version of an entity (their supertype)

  • Inherits attributes from a general entity (supertype)

  • A sub-group has distinct attributes from other sub-groups belonging to the same supertype

(b) Supertype

  • Generic entity type that has a relationship w/ one or more subtypes

(c) Attribute Inheritance

  • Subtypes automatically inherit all attributes and relationships from their supertype.

  • Example: If "Employee" (supertype) has attributes like EmployeeID and Name, both "Manager" and "Intern" (subtypes) will also have these attributes without needing to redefine them.

New cards
57

Demonstrate the Basic Notation for Supertype-Subtype Relationships

New cards
58
New cards
59
New cards
60
New cards
61

Describe the Constraints in Subtype/Supertype Relationships.

Subtype Discriminator: An attribute of the supertype whose values determine the target subtype(s)

  • -  Disjoint – a simple attribute with alternative values to indicate the possible subtypes

  • -  Overlapping – a composite attribute whose subparts pertain to different subtypes. Each subpart contains a Boolean value to indicate whether or not the instance belongs to the associated subtype

New cards
62

The Disjoint Rule

  • What

  • Purpose/Significance

  • Example

What:

Purpose/Significance:

Example

-

New cards
63

The Overlap Rule

  • What

  • Purpose/Significance

  • Example

What: Introduces a subtype discriminator

Purpose/Significance:

Example:

New cards
64

Entity Clusters

  • Definition

  • Purpose/Significance

  • Example

Definition: Set of one or more entity types and associated relationships grouped into a single abstract entity type

Purpose/Significance

  • EER (Enhanced ER) diagrams are difficult to read when there are too many entities and relationships.

  • Solution: Group entities and relationships into entity

Example

New cards
65
New cards
66
New cards
67
New cards
68
New cards
69
New cards
70
New cards
71
New cards
robot