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