Structuring Information: Data Modeling Basics, Explained

UPI Study › Courses › Software Engineering › Free lessons › Lesson 6.6 Free with a free account

Structuring Information: Data Modeling Basics

Software Engineering · Chapter 6: Requirements Engineering and PrototypingSection 6.6 · lesson 43 of 1037 min · free with a free account

← Getting Started with UML: A Visual Modeling LanguageNext lesson: Organizing Data with Class-Based Modeling →

Earn 3 college credits for Software EngineeringRecommended for credit by NCCRS · Computer Science 301 · self-paced · one payment, lifetime access

In this lesson

Entities, attributes, relationships, and cardinality.

  • Explain what a conceptual data model represents
  • Define entity, attribute, and relationship
  • Distinguish the 3 types of cardinality
  • Read a simple entity-relationship diagram

Transcript

Everything said in the video, section by section (985 words). Read along, or search it.

Requirements Engineering and Prototyping

Structuring Information: Data Modeling Basics

Every action a system performs works on information. Before a system can act on data, someone has to work out what that data looks like. This section covers data modeling at the conceptual level. Entities, attributes, relationships, and cardinality, drawn with the classic entity-relationship notation.

Beneath the Action

What Is an Order, Anyway?

A functional requirement like, let a user submit an order, describes an action. But underneath that action sits information. An order has to actually consist of something. A customer, a set of products, a date, and a total. Data modeling is the practice of working out what that information looks like, and how its pieces relate to one another. It represents the structure of a system's information on its own terms, separately from whatever behavior will later act on it. This section uses the classic entity-relationship notation, built specifically for data. It is different from the class diagrams used to model data and behavior together.

Conceptual Data Models

Independent of Implementation

A conceptual data model represents the structure of the information a system needs to keep track of. It shows what distinct kinds of things the system stores data about, what details matter for each one, and how those things relate. It deliberately stays independent of implementation. It says nothing about how the data will be stored in a database, or represented in code. That is the point. Modeling data before any database exists lets the structure be checked and agreed upon, before it becomes expensive to change.

The Building Blocks

Entities, Attributes, Relationships

A data model has three building blocks. An entity is a distinct kind of thing the system stores information about. A customer, a product, an order. An entity is a category, not one specific instance. Customer is the entity. One particular customer is an instance of it. An attribute is a specific piece of information describing an entity. A customer might have an ID, a name, and an email address. And a relationship is an association between two entities. A customer places an order. An order contains products. A relationship captures a fact about how the business works, not just a technical link.

Figure 6.6A

An Entity-Relationship Diagram

Here is a classic entity-relationship diagram. The three rectangles are entities. Customer, Order, and Product. The ovals attached to each rectangle are attributes. A customer has an ID, a name, and an email. An order has an ID, a date, and a total. The diamonds are relationships. A customer places an order, and an order contains products. And the one and M on the lines give the cardinality. One customer places many orders. And many orders contain many products.

Cardinality

How Many Relate to How Many

A relationship alone does not say how many instances can connect. That is what cardinality describes. Three patterns cover most real relationships. In a one-to-one relationship, exactly one instance on each side connects. One employee is assigned exactly one parking space. In a one-to-many relationship, one instance connects to several. One customer places many orders, while each order belongs to only one customer. And in a many-to-many relationship, several instances connect on both sides. Many students enroll in many courses, and each course has many students. These same three patterns repeat across almost every conceptual data model.

Reading the Diagram

3 Shapes, Used Consistently

Reading an entity-relationship diagram comes down to three shapes, used consistently. A rectangle is an entity. An oval attached to an entity is one of its attributes. A diamond is a relationship, connected to the two entities it relates. And cardinality is written directly on the connecting lines, usually as a one or an M. Notice what the diagram leaves out. It describes the shape of information alone, not the operations that will act on it.

Table 6.6

The Building Blocks at a Glance

Here are the building blocks at a glance. An entity is a distinct kind of thing the system stores data about, like a customer, an order, or a product. An attribute is a piece of information describing an entity, like a customer's name or email. A relationship is an association between two entities, like a customer placing an order. And cardinality is how many instances on each side can take part. For example, one customer, and many orders.

Think About It

Model a Library

Here is a question to think about. Picture a library. Two entities it would track are members and books. A member might have a card number, and a book an I S B N. The relationship between them is that a member borrows a book. So which cardinality? Over time, one member borrows many books, and one book is borrowed by many members. That makes it many to many. And notice what decided it. A real fact about how libraries work.

Apply It

Does 1 Author Write Each Book?

Let's apply that to a tricky case. A new analyst models a writes relationship between author and book as one to many, reasoning that one author writes many books. What real-world case breaks that? A book with several co-authors. Books can have many authors, and authors can write many books. So the correct cardinality is many to many.

Key Terms

The Vocabulary of This Section

Let's lock in the key terms. A conceptual data model represents the structure of a system's information, independent of how it will be implemented. An entity is a distinct kind of thing a system stores information about, and an attribute is a piece of information describing it. A relationship is an association describing how instances of two entities connect. Cardinality is how many instances on each side can relate. One to one, one to many, or many to many. And an entity-relationship diagram uses rectangles, ovals, and diamonds for entities, attributes, and relationships.

Key Takeaways

What to Carry Forward

To pull this together. Data modeling represents the structure of a system's information, independently of the behavior that will act on it. Its three building blocks are entities, attributes, and relationships. Cardinality describes how many instances can take part on each side. One to one, one to many, or many to many. Entity-relationship diagrams show entities as rectangles, attributes as ovals, and relationships as diamonds, with cardinality on the lines. And real-world facts, like books with co-authors, are what decide the right cardinality.

About Software Engineering at UPI Study

Software Engineering (Computer Science 301) is a self-paced online course of 103 video lessons in 15 chapters, from process models and agile to requirements, design, user interfaces, reliability, security and project management. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: Software Engineering vs Systems Analysis

Why take it here

Why students take Software Engineering with UPI Study

How professional software gets builtSoftware Engineering covers how teams turn requirements into working, maintainable software: process models, agile, requirements, design, testing, reliability and project management. It is a core course in computer science and software degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Software Engineering carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Structuring Information: Data Modeling Basics

What is a conceptual data model?
A conceptual data model represents the structure of the information a system needs to track: the kinds of things it stores data about, the details that matter for each, and how they relate. It deliberately says nothing about database storage or code, so the structure can be checked and agreed on before it becomes expensive to change.
What is the difference between an entity, an attribute, and a relationship?
An entity is a distinct kind of thing a system stores information about, such as a customer, product, or order. An attribute is a specific piece of information describing an entity, like a customer's name or email. A relationship is an association between two entities, such as a customer placing an order, and it captures a fact about how the business works.
What are the three types of cardinality in data modeling?
The three common types are one-to-one, one-to-many, and many-to-many. In one-to-one, one employee is assigned exactly one parking space. In one-to-many, one customer places many orders while each order belongs to one customer. In many-to-many, many students enroll in many courses. Real-world facts, such as books with several co-authors, decide which applies.
What do the shapes in an entity-relationship diagram mean?
In the classic entity-relationship notation, a rectangle is an entity, an oval attached to it is an attribute, and a diamond is a relationship connecting two entities. Cardinality is written on the connecting lines, usually as 1 or M. The diagram describes only the shape of information, not the operations that will act on it.

About the Software Engineering course

How many college credits is Software Engineering?
Software Engineering (Computer Science 301) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Software Engineering cost and what is included?
$250, paid once, with lifetime access: all 103 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Software Engineering take?
It is self-paced with no deadlines. The 103 lessons total about 11 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Software Engineering.

103 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Software Engineering
3 credits · NCCRS
Enroll →