Database Development Lifecycle

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which level of database design is concerned with how the data is actually stored and accessed?

  • High-level (Conceptual)
  • Application
  • Representational
  • Low-level (Physical) (correct)

Which of the following activities is part of creating a data model?

  • Normalizing relations
  • Gathering requirements (correct)
  • Creating the database structure within a Database Management System
  • Defining the relationships between tables

What is the purpose of transposing a data model into relations?

  • To transform the data model into a relational schema (correct)
  • To create a high-level conceptual representation of the data
  • To physically store the data on a storage device
  • To define the relationships between tables

What does the normalization process primarily ensure?

<p>That relations are fit for implementation in a DBMS (A)</p> Signup and view all the answers

In the database development lifecycle, after normalizing relations, what is the next step?

<p>Creating the database structure within a DBMS (A)</p> Signup and view all the answers

An 'entity class' in database modeling corresponds to which of the following in a database?

<p>A rectangle in an E-R diagram (D)</p> Signup and view all the answers

What does an 'entity instance' refer to?

<p>An occurrence of an entity class (D)</p> Signup and view all the answers

What is the main function of an identifier in the context of entity instances?

<p>To distinguish an entity instance from other entity instances (A)</p> Signup and view all the answers

Which of the following is an example of a non-unique identifier?

<p>Full Name (C)</p> Signup and view all the answers

What characterizes a composite identifier?

<p>It contains two or more attributes to identify an entity. (B)</p> Signup and view all the answers

In the context of transposing a data model, what happens to the entity's name?

<p>It becomes the name of the relation. (D)</p> Signup and view all the answers

During the transposing process, attributes of the entity generally become what in the relation?

<p>Attributes of the relation (C)</p> Signup and view all the answers

What happens to the identifier of the entity during transposition?

<p>It is proposed as the primary key of the relation. (A)</p> Signup and view all the answers

Which of the following is NOT something the 'relation' should exclude when transposing a model?

<p>Show a physical connection (C)</p> Signup and view all the answers

What is the most accurate representation of a relation?

<p>Two-dimensional structure (C)</p> Signup and view all the answers

Which of the following is a characteristic of a relation in First Normal Form (1NF)?

<p>Each column must have a unique name. (B)</p> Signup and view all the answers

Which of the following is NOT true about the features of First Normal Form?

<p>The order of the attributes is important (C)</p> Signup and view all the answers

What is a key requirement for tuples in a relation to satisfy First Normal Form (1NF)?

<p>They must all be unique. (B)</p> Signup and view all the answers

Why is it important to guarantee uniqueness for tuples in a relation?

<p>To avoid ambiguous or duplicate data (A)</p> Signup and view all the answers

What is the key difference between a natural primary key and a surrogate primary key?

<p>A natural key has meaning to and the organization (D)</p> Signup and view all the answers

According to the lifecycle example CONMAN, which relation is transposed?

<p>CONTACT_INFO (B)</p> Signup and view all the answers

What attributes are considered when transposing the CONTACT_INFO relation?

<p>contactID, firstname, middleinitial, lastname, suffix_description, title_description, jobtitle, department, email, url, IMaddress, phone_number, phonetype_description, birthday, notes, companyname, street1, street2, city, state_province, zipcode, country_region, company_url, company_phone (A)</p> Signup and view all the answers

In the CONMAN lifecycle example, is the CONTACT_INFO relation in 1NF?

<p>Yes, there are single values. (D)</p> Signup and view all the answers

When normalizing relations, what does 'same domain' ensure about columns?

<p>Values are logically and physically consistent. (C)</p> Signup and view all the answers

Why is maintenance a crucial step in the database development lifecycle?

<p>Because change happens and needs to be planned for. (B)</p> Signup and view all the answers

Flashcards

Entity-Relationship (E-R) Diagram

A diagram representing entities and their relationships in a database.

Transpose Data Model

The process of converting a data model into relations (tables).

Transposing Rule 1

The name of the entity becomes the table name.

Transposing Rule 2

Entity attributes become the columns.

Signup and view all the flashcards

Transposing Rule 3

Entity identifier becomes the primary key.

Signup and view all the flashcards

Relation

Two-dimensional structure holding data about an object.

Signup and view all the flashcards

Normalize Relations

Ensuring relations meet implementation standards.

Signup and view all the flashcards

Attribute relates to:

A column in a relation.

Signup and view all the flashcards

Tuple relates to:

A row in a relation.

Signup and view all the flashcards

1NF: Single values?

Each cell should have a single value.

Signup and view all the flashcards

1NF: Same Data Type?

All entries in each column must be of the same type.

Signup and view all the flashcards

1NF: Unique columns?

Each column name must be unique.

Signup and view all the flashcards

1NF: Attribute order?

Attribute order is not important.

Signup and view all the flashcards

1NF: Tuple order?

The order of the tuples is unimportant.

Signup and view all the flashcards

1NF: Unique rows?

All the rows of the table must be unique.

Signup and view all the flashcards

What's a Primary Key?

An attribute whose values uniquely identify each entity.

Signup and view all the flashcards

1NF: Require a primary key?

1NF must have a primary key

Signup and view all the flashcards

Natural Primary Key

Attribute with inherent meaning that is a primary key.

Signup and view all the flashcards

Surrogate Primary Key

Artificial key for uniqueness, no real-world meaning.

Signup and view all the flashcards

Study Notes

  • Introduction to Database & Data Modeling: Week 2

Database Development Lifecycle

  • Create a Data Model from gathered requirements using an Entity-Relationship Model.
  • Transpose the Data Model into Relation(s).
  • Normalize Relations.
  • Create the database structure within the Database Management System which is considered Metadata.
  • Define Relationships between Tables, which is also Metadata.
  • Define forms, queries, reports, and menus which is Application Metadata, if your DBMS or external application programs support it.
  • Maintenance is necessary because change is inevitable, so plan for it.
  • Maintenance involves dealing with User Needs, DBMSs, and Hardware.

Expanded Database Development Lifecycle

  • The expanded lifecycle includes creating the database
  • The expanded lifecycle includes creating the table(s).
  • It also involves populating the database with User Data, and the process of determining responsibility will depend on the situation

Entity (Class) Review

  • An entity class is a set of data of interest
  • Corresponds to rectangles in an E-R diagram
  • Corresponds to tables in a database schema

Entity (Instance) Review

  • An entity instance refers to an occurrence of an entity class
  • Not usually shown in an E-R diagram
  • Corresponds to a row in a database table

Identifiers

  • Entity instances have identifiers which are one or more attributes that distinguish an entity instance from others.
  • Identifiers can be unique to only identify one instance from the set of entity instances, like a Social Security Number.
  • Non-unique identifiers identify more than one row, like a name which may identify several employees.
  • A non-unique identifier identifies a set of entity instances in the entity class.
  • A composite identifier is when two or more attributes are contained in an identifier, like first name, middle initial, and last name.

Step 1: Data Model Creation

  • The first step in the Lifecycle Example is to create a data model.
  • The data model is based on the Contact Management System (Conman).

Step 2: Transpose Data Model into Relation(s)

  • The name of the entity becomes the name of the "relation".
  • Attributes of the entity become attributes of the "relation", except for composite and derived attributes.
  • Use Relational Schema Notation, which is a one-dimensional view using RELATION(attr1, attr2, attr3, ...), for example, A(2, 3, 4, 5).
  • The identifier of the entity becomes the proposed primary key of the "relation", denoted by underlining, for example, RELATION(attr1, attr2, attr3...).
  • Use Relational Schema Notation, for example, A(2, 3, 4, 5) where a composite primary key is formed by 2 and 3.
  • There is one primary key in A.

Transposing Example: EMPLOYEE

  • The Crow's Foot Notation shows the transposed relation, which is a one dimensional view.
  • The transposed relation is showed as EMPLOYEE(SSN, Name, DOB).

Relation

  • A relation is a two dimensional structure that holds data pertaining to an object of interest, such as an Employee with SSN, Name, and DOB.

Step 3: Normalize Relation(s)

  • Purpose is to ensure relations are fit for implementation in a DBMS.
  • Check that the “relation” is in First Normal Form (1NF).
  • Here are the characteristics for the “relation”:
  • Rows contain data about tuples or instances of the relation
  • Cells of the table hold a single value (no arrays)
  • Columns are attributes of the relation
  • All entries in a column are of the same domain (physical and logical)
  • Each column has a unique name
  • Order of the attributes is unimportant
  • The order of the tuples is unimportant
  • No two tuples may be identical (Must have a primary key)
  • Natural primary key (already existing attribute) vs Surrogate primary key (used only to guarantee uniqueness)
  • If the relation meets the characteristics, then the relation is in 1NF.
  • If not, then the relation must be modified so that it does meet the characteristics.

Valid Relation?

  • In order to be valid, no two entries may be identical
  • Furthermore, all column entries need to be of the same type

Equivalent Relations?

  • The order of rows in the table does not matter

Natural Primary Key

  • In EMPLOYEE(SSN, Name, DOB), the SSN is a natural primary key.
  • This is because the SSN the attribute has meaning to the organiation and the values for the attribute would be unique.

Surrogate Primary Key

  • In EMPLOYEE(EmployeeID, SSN, Name, DOB) the EmployeeID is the surrogate primary key.
  • This is because it only provides a unique value to each instance of employee and the values have no meaning to the organization.

Is the CONTACT INFO relation in 1NF?

  • Here are the characteristics:
  • Rows contain data about tuples or instances of the relation
  • Cells of the table hold a single value
  • Columns are attributes of the relation
  • All entries in a column are of the same domain
  • Each column has a unique name
  • The order of the attributes is unimportant
  • The order of the tuples is unimportant
  • No two tuples may be identical

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser