Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3604550
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:00:43+00:00 2026-05-18T21:00:43+00:00

This is based on my assumption that taking an object of type: public class

  • 0

This is based on my assumption that taking an object of type:

public class Fruit : IBasicFruit, IFruitDetails
{
    // IBasicFruit implementation
    public string name { get; set; }
    public string color { get; set; }

    // IFruitDetails implementation
    public string scientific_name { get; set; }
    public bool often_mistaken_for_vegetable { get; set; }
    public float average_grams { get; set; }
    public int century_domesticated { get; set; }
}

… and from it creating an object of type:

public class BasicFruit : IBasicFruit
{
    public string name { get; set; }
    public string color { get; set; }
}

… is known as “projection”, or “type projection” (that projection applies not only to anonymous types).

Now, let’s say I send a serialized BasicFruit from a server to my client application, where some highly sophisticated farm logic is performed on those two strings, and then it gets sent back to the server, where the ORM is not aware of the BasicFruit type, only of the Fruit entity type. If I create a new Fruit object based on my BasicFruit object (ignoring the properties that do not exist in BasicFruit), so my ORM can persist it, is that the opposite of projection, because I am going from subset to superset, or is it still considered projection, or is this just mapping?

Could projection be considered a form of mapping?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:00:44+00:00Added an answer on May 18, 2026 at 9:00 pm

    In relational algebra projection is an operation that takes a relation and a subset of that relation’s columns and returns a new relation. The new relation is the same as the input relation, except it only has the specified columns.

    projection : Relation -> Column list -> Relation
    

    There may be fewer rows in the output relation than the input relation because multiple rows project to the same row if their values for the specified columns are the same.

    Now consider the inverted operation:

    inverse_projection : Relation -> Column list -> Relation
    

    Here we have an input relation whose column names are a subset of the columns in the output relation. Now we need the Column list to be columns of the output relation, which is now a superset of the columns in the input relation. This is a bit peculiar because we have to create rows for the output relation where some of the column values are left unspecified. Purely from a relational algebra perspective, this doesn’t make much sense. After all, where does the data come from for these unspecified columns? Also, unlike the projection operation the input and output relations always have the same number of rows.

    In SQL we’re allowed to insert data by specifying only some of the table’s columns. The unspecified columns take on their default values.

    INSERT INTO fruit (name, color) VALUES
    ('apple', 'red'),
    ('apple', 'green'),
    ('orange', 'orange');
    

    Going back to relational algebra this is like more like taking the cross product of the relation…

    NAME, COLOR
    apple, red
    apple, green
    orange, orange
    

    with the relation…

    SCIENTIFIC_NAME, OFTEN_MISTAKEN_FOR_A_VEGETABLE, AVERAGE_GRAMS, CENTURY_DOMESTICATED
    "", false, null, null
    

    than doing a so-called inverted projection. Again, they’re similar conceptually, but you’re really taking a cross product with the default values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

edit : I based this question on a false assumption - that the generic
I'm optimizing a sorting function for a numerics/statistics library based on the assumption that,
This is based on a similar question How to Replace Multiple Characters in Access
This is based on my full question . I decided to take it in
Some time ago I created this LAMP based web. At the time I wrote
This question is based on another question of mine (thankfully answered). So if in
This request is based in MS Access VBA. I would like to know what
This question is based on the thread . I have the shell function function
This question is based on this thread . Is [---] a comment in Git
This question is based on this thread . I am interested in how Git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.