Unit 5: The Relational Database Model
The relational database model provides us with a way to understand how data can be perceived. While the E-R model represents the relations between elements of a database, it does not provide a logical view of its data. We will use the relational model to solve that problem. The relational model looks at entities as tables and allows operations to be performed on them. In this unit, we will learn how to map ER models into relations.
From a life-cycle perspective, the relational model corresponds to high-level design, and adds detail to the conceptual design. The database development evolves from requirements (specified in a conceptual model), to high-level database design (specified in a logical model), to an implementation model (specified in a detailed design and physical model). An E-R model is a particular modeling method for requirements, while a relational model is a method for database design.
Completing this unit should take you approximately 4 hours.
Upon successful completion of this unit, you will be able to:
- describe the relational database model;
- discuss how to map an entity-relationship diagram to a relational model; and
- explain the various types of integrity constraints.
5.1: The Relational Model at a Glance
Review chapter 7, which we looked at previously in Unit 2. The relational model uses tables for relations, table columns for attributes, and table rows for records. Some references may refer to the product of data analysis as a logical model. Here we refer to the product of data analysis as a conceptual model and the product of database design as a logical model. In either case, the database design model addresses how data is used. It is more detailed than the data analysis model, which is concerned with the meaning of the data and its structure.
Read chapter 6, which supplements the chapter you just reviewed.
5.2: Mapping an E-R Diagram to a Relation
A model of a database (that is, the design) is based on but not uniquely determined by the model of the requirements (the conceptual design). In other words, a given conceptual design can be transformed to one of several designs depending on the design decisions made. This transition from requirements to design is called mapping. This subunit discusses mapping from an E-R model to a relational model.
For software development, it is generally desirable to use methods and models for each phase that are compatible, which eases the transition from one phase to another. So too with databases. This video maps an E-R model to a relational model that supports the requirements analysis and design of a database, and covers the transition between the two.
Read chapter 9, which presents constraints on attributes or tables. A constraint is a rule for incorporating semantics of the application data into the relational model. There are constraints for database integrity, application semantics, business rules,
Unit 5 Assessment
- Receive a grade
Take this assessment to see how well you understood this unit.
- This assessment does not count towards your grade. It is just for practice!
- You will see the correct answers when you submit your answers. Use this to help you study for the final exam!
- You can take this assessment as many times as you want, whenever you want.