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 8086737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:32:42+00:00 2026-06-05T18:32:42+00:00

I am writing an app with a database that has a slightly unusual schema.

  • 0

I am writing an app with a database that has a slightly unusual schema. At least I think it’s unusual, I rarely do DB stuff.

All my books tell me I should be using Entity Framework (or some other ORM) for DB access, but the examples they give are always bog standard CRUD. One table per entity, one row per object, active record etc.

My schema uses disjoint subtypes, so multiple tables per entity, and has revision history so edits actually create a new row, but only in one table (depending on the field/s edited)

Does EF cater for this kind of custom behaviour or is it geared toward conventional patterns? My understanding is that I create a schema or domain objects, and the database manipulation code is automatically generated. Can I override the default behaviour? How else could I tell EF about my custom behaviour?

I am more than willing to learn EF if it is going to make my life easier, but I don’t want to put a lot of effort into learning a framework that I am going to end up fighting to make it do what I want. If this is the case I would rather just roll my own repositories and handle the SQL myself.

  • 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-06-05T18:32:43+00:00Added an answer on June 5, 2026 at 6:32 pm

    The question is too abstract to be definitely answered. EF offers some advanced mapping scenarios where more tables can be mapped to single entity but it defines strict rules to achieve that. Alternatively you can map database views or custom SQL queries combining data from your tables to form your entities.

    More complicated is your second requirement – it generally requires writing your own SQL / stored procedures and map it to EFs CUD operations performed on tables. This SQL code will contain part of your update rules because EF updates whole entity not only affected record. If you use mapped views or queries you must map these CUD operations to custom SQL or stored procedures because otherwise your entities will be read only.

    Conclusion: It can be possible to achieve what you want but it is not simple, it requires advanced knowledge of EF and you will still write some SQL.

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

Sidebar

Related Questions

I am looking into writing an Android app that has a database of approximately
I'm writing a database app, that is going to pull out some data and
I'm currently writing a Java app that interfaces with a MySQL database. My problem
I'm writing an app that has a foreground service, content provider, and a Activity
I am re-writing an app that sits over a legacy database. I'm using NHibernate
I'm writing a Google App Engine database that once it goes live will probably
I am writing an app that has different parts running on multiple servers. As
I'm writing an android app that has a standard activity, but also needs to
I'm writing an android app that has a standard activity, but also needs to
I am writing a app that has a UIWebView that displays a HTML5 page.

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.