Quiz 1 Flashcards

1
Q

attribute

A

An entity is described (in DB) using a set of attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

domain

A

For each attribute associated with an entity set, we must identify a domain of possible values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

entity

A

Real-world object distinguishable from other objects. An entity is described (in DB) using a set of attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

relationship

A

A collection of similar entities. E.g., all employees.
All entities in an entity set have the same set of attributes. (Until we consider ISA hierarchies, anyway!)
Each entity set has a key.
Each attribute has a domain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

relationship set

A

Collection of similar relationships.
An n-ary relationship set R relates n entity sets E1 … En; each relationship in R involves entities e1 E1, …, en En
Same entity set could participate in different relationship sets, or in different “roles” in same set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

key constraint

A

A restriction on the relationships an entity can have. Can include 1-to-1, 1-to-Many, Many-to-1, or Many-to-Many

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

participation constraint

A

Does every department have a manager?
If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial).
Every did value in Departments table must appear in a row of the Manages table (with a non-null ssn value!)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

overlap constraint

A

Can Joe be an Hourly_Emps as well as a Contract_Emps entity? (Allowed/disallowed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

covering constraint

A

Does every Employees entity also have to be an Hourly_Emps or a Contract_Emps entity? (Yes/no)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

weak entity set

A

A weak entity can be identified uniquely only by considering the primary key of another (owner) entity.

Owner entity set and weak entity set must participate in a one-to-many relationship set (one owner, many weak entities).

Weak entity set must have total participation in this identifying relationship set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

ISA hierarchy

A

If we declare A ISA B, every A entity is also considered to be a B entity.

Reasons for using ISA:
To add descriptive attributes specific to a subclass.
To identify entitities that participate in a relationship

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

aggregation

A

Used when we have to model a relationship involving (entity sets and) a relationship set.

Allows us to treat a relationship set as an entity set for purposes of participation in (other) relationships.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

role indicator

A

If an entity set plays more than one role, the role indicator concatenated with an attribute name from the entity set gives us a unique name for each attribute in the relationship set. For example, the Reports_To relationship
set has attributes corresponding to the ssn of the supervisor and the ssn of the subordinate, and the names of these attributes are supervisor_ssn and
subordinate_ssn.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name the main steps in database design. What is the goal of each step?
In which step is the ER model mainly used? (Section 2.1)

A
  1. Requirements Analysis: The very first step in designing a database application is to understand what data is to be stored in the database, what applications must be built on top of it, and what operations are most frequent and subject to performance requirements.
  2. Conceptual Database Design: The information gathered in the requirements analysis step is used to develop a high-level description of the data to be stored in the database, along with the constraints known to hold over
    this data.
  3. Logical Database Design: We must choose a DBMS to implement our database design, and convert the conceptual database design into a database schema in the data model of the chosen DBMS.
  4. Schema Refinement: The fourth step of database design is to analyze the collection of relations in our relational database schema to identify potential problems, and to refine it. In contrast to the requirements analysis and conceptual design steps, which are essentially subjective, schema refinement can be guided by some elegant and powerful theory.
  5. Physical Database Design: In this step, we consider typical expected workloads that our database must support and further refine the database design to ensure that it meets desired performance criteria. This step may
    simply involve building indexes on some tables and clustering some tables, or it may involve a substantial redesign of parts of the database schema obtained from the earlier design steps.
  6. Application and Security Design: Any software project that involves a DBMS must consider aspects of the application that go beyond the database itself. Design methodologies like UML (Section 2.7) try to address
    the complete software design and development cycle. Briefly, we must identify the entities (e.g., users, user groups, departments) and processes involved in the application. We must describe the role of each entity in every process that is reflected in some application task, as part of a complete workflow for that task. For each role, we must identify the parts of the database that must be accessible and the parts of the database that must
    not be accessible, and we must take steps to ensure that these access rules are enforced.

The ER Model is used in the first three steps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Entity vs Attribute

A

Should address be an attribute of Employees or an entity (connected to Employees by a relationship)?
Depends upon the use we want to make of address information, and the semantics of the data:
If we have several addresses per employee, address must be an entity (since attributes cannot be set-valued).
If the structure (city, street, etc.) is important, e.g., we want to retrieve employees in a given city, address must be modeled as an entity (since attribute values are atomic).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Entity vs. Relationship

A

First ER diagram OK if a manager gets a separate discretionary budget for each dept.
What if a manager gets a discretionary budget that covers all managed depts?
Redundancy: dbudget stored for each dept managed by manager.
Misleading: Suggests dbudget associated with department-mgr combination.

17
Q

Binary vs. Ternary Relationships

A

If each policy is owned by just 1 employee, and each dependent is tied to the covering policy, first diagram is inaccurate.
What are the additional constraints in the 2nd diagram?

18
Q

Why is designing a database for a large enterprise especially hard? (Section 2.6)

A

For a large enterprise, the design may require
the efforts of more than one designer and span data and application code used by a number of user groups. Using a high-level, semantic data model, such as ER diagrams, for conceptual design in such an environment offers the
additional advantage that the high-level design can be diagrammatically represented and easily understood by the many people who must provide input to
the design process.

19
Q

What is UML? How does database design fit into the overall design of a data-intensive software system? How is UML related to ER diagrams? (Section 2.7)

A

UML, like the ER model, has the attractive feature that its constructs can be drawn as diagrams. It encompasses a broader spectrum of the software design process than the ER model.