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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:43:45+00:00 2026-05-23T07:43:45+00:00

Hi my site has the following database structure: Sections Id (PK, Identity) Name Documents

  • 0

Hi my site has the following database structure:

Sections

  • Id (PK, Identity)
  • Name

Documents

  • Id (PK, Identity)
  • SectionId (FK to Sections)

Articles

  • Id (PK, FK to Documents)
  • Title
  • Content

Links

  • Id (PK, FK to Doucments)
  • Title
  • SomeOtherField

MetaComponent

  • Id (PK, FK to Documents)
  • MetaKeywords
  • MetaDescription

SectionComponents

  • SectionId (FK to Sections)
  • ComponentName

The site contains multiple sections (Articles and Links in the above structure). The Articles and Links tables extend the Document with the extra fields that only apply for that particular section. Each section can optionally have additional Components added to them. The MetaComponent table is an example of one particular Component which includes the search engine meta information.

I was wondering if it’s possible to map my application so i can query all Articles and join it to get the meta Information for that particular article. I know i could add a Meta property against my Article class but i want to be able to easily switch on and off which components apply to particular sections. I guess i would have to do something a little fancier to retrieve this information and would appreciate it if someone could help.

I hope i’ve explained things clear enough.

Thanks

  • 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-23T07:43:46+00:00Added an answer on May 23, 2026 at 7:43 am

    firstly- one of the biggest advantages of nHib (or any ORM, for that matter) is that it enables you to view your app domain as entities rather than tables.
    So in your case, I think it would be more correct, and more understandable, to look at your Document entity as being a base-class, of which Link and Article are sub-classes.
    And when we look at it like that, the solution to your problem is obvious- mapping of subclasses:
    * fluent nHib docs for mapping inheritance,
    * more detailed info can be found in the nHib docs.

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

Sidebar

Related Questions

My site has quite a deep navigation structure and quite often it looks like
my site has three div elements, header, content and footer. i have a picture
I'm changing my database structure and I want to do the following thing: I
I have a unit test which contains the following line of code Site.objects.get(name=UnitTest).delete() and
I have a database of person documents. Each has a field named photos, which
My site has a drop-down menu built in CSS and JavaScript that drops down
Our site has multiple wizards where various data is collected over several pages, and
My site has an input box, which has a onkeydown event that merely alerts
My site has a library full of games, nations, game scenarios, etc. library.php is
This site has a technique to pass xml data around in Microsoft SQL Server:

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.