Podcast
Questions and Answers
Which level of database design is concerned with how the data is actually stored and accessed?
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?
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?
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?
What does the normalization process primarily ensure?
In the database development lifecycle, after normalizing relations, what is the next step?
In the database development lifecycle, after normalizing relations, what is the next step?
An 'entity class' in database modeling corresponds to which of the following in a database?
An 'entity class' in database modeling corresponds to which of the following in a database?
What does an 'entity instance' refer to?
What does an 'entity instance' refer to?
What is the main function of an identifier in the context of entity instances?
What is the main function of an identifier in the context of entity instances?
Which of the following is an example of a non-unique identifier?
Which of the following is an example of a non-unique identifier?
What characterizes a composite identifier?
What characterizes a composite identifier?
In the context of transposing a data model, what happens to the entity's name?
In the context of transposing a data model, what happens to the entity's name?
During the transposing process, attributes of the entity generally become what in the relation?
During the transposing process, attributes of the entity generally become what in the relation?
What happens to the identifier of the entity during transposition?
What happens to the identifier of the entity during transposition?
Which of the following is NOT something the 'relation' should exclude when transposing a model?
Which of the following is NOT something the 'relation' should exclude when transposing a model?
What is the most accurate representation of a relation?
What is the most accurate representation of a relation?
Which of the following is a characteristic of a relation in First Normal Form (1NF)?
Which of the following is a characteristic of a relation in First Normal Form (1NF)?
Which of the following is NOT true about the features of First Normal Form?
Which of the following is NOT true about the features of First Normal Form?
What is a key requirement for tuples in a relation to satisfy First Normal Form (1NF)?
What is a key requirement for tuples in a relation to satisfy First Normal Form (1NF)?
Why is it important to guarantee uniqueness for tuples in a relation?
Why is it important to guarantee uniqueness for tuples in a relation?
What is the key difference between a natural primary key and a surrogate primary key?
What is the key difference between a natural primary key and a surrogate primary key?
According to the lifecycle example CONMAN, which relation is transposed?
According to the lifecycle example CONMAN, which relation is transposed?
What attributes are considered when transposing the CONTACT_INFO relation?
What attributes are considered when transposing the CONTACT_INFO relation?
In the CONMAN lifecycle example, is the CONTACT_INFO relation in 1NF?
In the CONMAN lifecycle example, is the CONTACT_INFO relation in 1NF?
When normalizing relations, what does 'same domain' ensure about columns?
When normalizing relations, what does 'same domain' ensure about columns?
Why is maintenance a crucial step in the database development lifecycle?
Why is maintenance a crucial step in the database development lifecycle?
Flashcards
Entity-Relationship (E-R) Diagram
Entity-Relationship (E-R) Diagram
A diagram representing entities and their relationships in a database.
Transpose Data Model
Transpose Data Model
The process of converting a data model into relations (tables).
Transposing Rule 1
Transposing Rule 1
The name of the entity becomes the table name.
Transposing Rule 2
Transposing Rule 2
Signup and view all the flashcards
Transposing Rule 3
Transposing Rule 3
Signup and view all the flashcards
Relation
Relation
Signup and view all the flashcards
Normalize Relations
Normalize Relations
Signup and view all the flashcards
Attribute relates to:
Attribute relates to:
Signup and view all the flashcards
Tuple relates to:
Tuple relates to:
Signup and view all the flashcards
1NF: Single values?
1NF: Single values?
Signup and view all the flashcards
1NF: Same Data Type?
1NF: Same Data Type?
Signup and view all the flashcards
1NF: Unique columns?
1NF: Unique columns?
Signup and view all the flashcards
1NF: Attribute order?
1NF: Attribute order?
Signup and view all the flashcards
1NF: Tuple order?
1NF: Tuple order?
Signup and view all the flashcards
1NF: Unique rows?
1NF: Unique rows?
Signup and view all the flashcards
What's a Primary Key?
What's a Primary Key?
Signup and view all the flashcards
1NF: Require a primary key?
1NF: Require a primary key?
Signup and view all the flashcards
Natural Primary Key
Natural Primary Key
Signup and view all the flashcards
Surrogate Primary Key
Surrogate Primary Key
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.