☁️
Microsoft
  • Readme
  • Virtual Internship Program
    • InsideSherpa & Background
    • Goal Tracking
    • Engineering Internship
      • 1. Research on Microsoft
      • 2. Preparing for the Virtual Experience
        • Preparing for my virtual internship with Microsoft
        • SMART goal setting
      • 3. Campus: Business Foundation Skills
        • Respect, Integrity and Accountability
          • Situational based questions
        • Commitment and approach to values into action
        • Microsoft's cultural transformation
        • Microsoft's solutions for digital transformation
      • 4. Campus: Work Ready Skills
        • My professional voice (be confident)
          • Confidence in meetings
          • Confidence in business
          • Confidence in communication
          • The task
        • A professional approach to meetings
        • The importance of your personal brand
      • 5. Work Ready Skills
      • 6. Technical Engineer Skills
    • Go-To-Market Internship
      • 1. Research on Microsoft
      • 2. Preparing for the Virtual Experience
        • Asia Pacific Internship Experience
        • SMART Goals
  • Microsoft Student Accelerator (MSA)
    • Workshop 1: AI & Machine Learning
    • Project 1: Machine Learning
    • MSLearn 1
    • Workshop 2: Cloud Fundamentals
    • MSLearn 2
    • Project 2: Web Application
      • My idea
      • Exploring msa.ms (old website)
        • For Schools
        • For Employers
        • Events
      • Finding a theme
      • Collecting assets
      • Designing the Header
      • A custom domain using Azure DNS
        • Azure DNS Learn Path
        • Introduction
        • What is DNS?
        • Azure DNS
        • Configuring Azure DNS
        • Buying a custom domain on GoDaddy
      • Plugins
        • Contact Form
        • Implementing SEO
        • Anti-spam
        • SSL
      • Transfering to a new domain
      • Improving site Health
      • Adding custom CSS
      • Interactivity with JS
      • Managing Wordpress from the terminal
      • Next steps: Editing content
      • The front page
        • Global elements
        • Layouts are good sometimes
        • Customising the front page
      • Revisiting the contact form
      • RYTE SEO Analysis
      • Cache Management
      • Traffic Monitoring and Analytics
      • FAQ
      • Documentation
    • Workshop 3: Web App & APIs
    • Project 3: Building an app
      • Target Persona
      • Idea
    • MSLearn 3
      • Create a Canvas App
        • Get started with Power Apps
          • Introducing Power Apps
          • Untitled
      • Use UI and controls
  • Interview Preparation
    • Azure (Cloud) Application & Infrastructure Specialist Roles
      • Revisiting my assessment
      • The technical assessment
      • Using LinkedIn
    • Technology Strategist Roles
      • Partner Technical Architect
  • Power Platform
    • Power Platform Fundamentals
      • The Power Platform
        • A Data-driven World
        • What is the Power Platform?
        • Features of the Power Platform
        • Data Connectors
        • Data Delegation
        • Creating Custom Connectors
        • Putting it all together
      • Power Apps
        • What is Power Apps?
        • Power Apps & what it can do
        • The 3 Types of Power Apps
        • AI Builder in your Power Apps
        • The 4 Models of AI Builder
        • The business value of Power Apps
        • Case study: Heathrow Airport
      • Common Data Service
        • What is the Common Data Service?
        • Entities in Common Data Service
        • Scalability
        • The Common Data Model
        • Types of Entities and Fields in CDS
        • Understanding relationships using Entities
        • Environments in Common Data Service
        • Business Rules
        • Administer (Administration)
      • Building an app solution
        • Basic elements
        • Untitled
      • Power Automate
        • What is Power Automate?
          • Types of flows
      • Building an automated solution
      • Power BI
        • Parts of Power BI
      • Building a simple dashboard
    • PL-900
  • Microsoft Azure
    • Cloud Concepts
      • Principles of cloud computing
        • An analogy
    • Core Cloud Services
    • AZ-900
      • Virtual Training Day
        • 1.
        • 2.
        • 3.
        • 4.
  • Microsoft 365
    • Microsoft 365 Fundamentals
      • What is Microsoft 365?
  • UNSW Cloud Society
    • Microsoft Azure
      • Workshop 1
      • Workshop 2
      • Workshop 3
    • Power Platform
      • Building a Helmet Detection App
  • Microsoft Reactor
    • PowerApps workshop
  • News
    • Microsoft exams $15 down from $100
    • Microsoft's cultural transformation
Powered by GitBook
On this page
  • Sales Solution Example
  • Relational Entities
  • Parent (Keys) and Child (Foreign)

Was this helpful?

  1. Power Platform
  2. Power Platform Fundamentals
  3. Common Data Service

Understanding relationships using Entities

In order to design an elegant and efficient solution, the general strategy is to structure your database in sections, by grouping up your data into different containers (or entities). This allows you to establish a common relationship between different pieces of information in your solution and lets you more easily track important entities and create metrics based on your data.

Sales Solution Example

Let's look at trying to build a sales solution as an example to illustrate how structuring our data properly can help a business operate more effectively.

In order to build a system to manage sales orders there are a few things we need:

  • A list of products

    • The current inventory count (stock) of each product

    • The price of each product

  • Customer information

    • Name of customer

    • Customer identification number

    • Customer contact number

    • Address of customer

    • Credit rating of customer

  • Sales Invoices

    • Data of sale

    • Invoice reference number

    • Salesperson

    • Customer information (as above)

    • line item

  • Line item (unique item identifier)

    • References the item

    • Provides cost and price of item at the time of sale

    • Decreases quantity of item based on number sold

Here you can see a natural sort of grouping occurs when talking about the system. Where you have different categories of things within the system (these are our entities). It would be impractical if we were to try and shove all of these different things into one entity, messing up the structure of our database. Instead, we can create entities based off these four groups being:

  • Products

  • Customers

  • Invoices

  • Line Items

Creating an entity for each of these can thereby result in a much cleaner solution that we can scale out if necessary. This helps us out with reducing chances of having duplicate data because we can now easily lookup things in our database before adding anything new. Moreover, by making it easier to get things from our solution, it helps with generating reports quickly since all the functionality we need to interact with our data is set out nicely.

Relational Entities

Entities that relate to one another hold a relational connection. We can define these relationships as either being:

  1. One-to-one relationship

  2. Many-to-many relationship

A one-to-one relationship is simply a normal hierarchial relationship where we have a parent-child arrangement. In the example above, the invoices contain a line item on them. As such, we can say that the Parent: Invoice and the Child: Line Item. This relationship means that with our invoices, we can have zero, one or many children one each invoice, but you generally won't have a line item without the invoice existing first (i.e. need parent to have a child).

Parent (Keys) and Child (Foreign)

Parents have a unique identifier that we call Keys. An example of this being used would be the Invoice entity containing a unique invoice number. This value is stored in the Parent record as a 'Key' and also stored in the Child record as a 'Foreign Key'.

Having the data set up in this manner enables us to do filtering easily. If we want to get the children nodes of the Parent: Invoice then we simply search for entities that contain a Foreign Key which matches the Key of the Parent.

PreviousTypes of Entities and Fields in CDSNextEnvironments in Common Data Service

Last updated 4 years ago

Was this helpful?

Visual representation of Parent-Child relationship using keys