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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:02:32+00:00 2026-06-15T06:02:32+00:00

I have a database that is holding real estate MLS (Multiple Listing Service) data.

  • 0

I have a database that is holding real estate MLS (Multiple Listing Service) data. Currently, I have a single table that holds all the listing attributes (price, address, sqft, etc.). There are several different property types (residential, commercial, rental, income, land, etc.) and each property type share a majority of the attributes, but there are a few that are unique to that property type.

My question is the shared attributes are in excess of 250 fields and this seems like too many fields to have in a single table. My thought is I could break them out into an EAV (Entity-Attribute-Value) format, but I’ve read many bad things about that and it would make running queries a real pain as any of the 250 fields could be searched on. If I were to go that route, I’d literally have to pull all the data out of the EAV table, grouped by listing id, merge it on the application side, then run my query against the in memory object collection. This also does not seem very efficient.

I am looking for some ideas or recommendations on which way to proceed. Perhaps the 250+ field table is the only way to proceed.

Just as a note, I’m using SQL Server 2012, .NET 4.5 w/ Entity Framework 5, C# and data is passed to asp.net web application via WCF service.

Thanks in advance.

  • 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-15T06:02:33+00:00Added an answer on June 15, 2026 at 6:02 am

    Lets consider the pros and cons of the alternatives:

    One table for all listings + attributes:

    1. Very wide table – hard to view to model & schema definitions and table data
    2. One query with no joins required to retreive all data on listing(s)
    3. Requires schema + model change for each new attribute.
    4. Efficient if you always load all the attributes and most items have values for most of the attributes.
    5. Example LINQ query according to attributes:
    context.Listings.Where(l => l.PricePerMonthInUsd < 10e3 && l.SquareMeters >= 200)
        .ToList();
    

    One table for all listings, one table for attribute types and one for (listing IDs + attribute IDS +) values (EAV):

    1. Listing table is narrow
    2. Efficient if data is very sparse (most attributes don’t have values for most items)
    3. Requires fetching all data from values – one additional query (or one join, however, that would waste bandwidth – will fetch basic listing table data per attribute value row)
    4. Does not require schema + model changes for new attributes
    5. If you want type safe access to attributes via code, you’ll need custom code generation based on attribute types table
    6. Example LINQ query according to attributes:
    var listingIds = context.AttributeValues.Where(v =>
                        v.AttributeTypeId == PricePerMonthInUsdId && v < 10e3)
                    .Select(v => v.ListingId)
                    .Intersection(context.AttributeVales.Where(v =>
                        v.AttributeTypeId == SquareMetersId && v.Value >= 200)
                    .Select(v => v.ListingId)).ToList();
    

    or: (compare performance on actual DB)

    var listingIds = context.AttributeValues.Where(v =>
                        v.AttributeTypeId == PricePerMonthInUsdId && v < 10e3)
                    .Select(v => v.ListingId).ToList();
    
    listingIds = context.AttributeVales.Where(v =>
                    listingIds.Contains(v.LisingId)
                    && v.AttributeTypeId == SquareMetersId
                    && v.Value >= 200)
                .Select(v => v.ListingId).ToList();
    

    and then:

    var listings = context.Listings.Where(l => listingIds.Contains(l.ListingId)).ToList();
    

    Compromise option – one table for all listings and one table per group of attributes including values (assuming you can divide attributes into groups):

    1. Multiple medium width tables
    2. Efficient if data is sparse per group (e.g. garden related attributes are all null for listings without gardens, so you don’t add a row to the garden related table for them)
    3. Requires one query with multiple joins (bandwidth not wasted in join, since group tables are 1:0..1 with listing table, not 1:many)
    4. Requires schema + model changes for new attributes
    5. Makes viewing the schema/model simpler – if you can divide attributes to groups of 10, you’ll have 25 tables with 11 columns instead of another 250 on the listing table
    6. LINQ query is somewhere between the above two examples.

    Consider the pros and cons according to your specific statistics (regarding sparseness) and requirements/maintainability plan (e.g. How often are attribute types added/changed?) and decide.

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

Sidebar

Related Questions

Hello I have table in my database holding some browser information I'm currently using
I have a database that will be holding sensitive data, so it should be
I have a database that has a table email_eml that stores 3 attributes name_eml,
I have a Database that contains data about articles , structures and manufacturers .
I currently have several audit tables that audit specific tables data. e.g. ATAB_AUDIT, BTAB_AUDIT
I have a database holding a lot of static data for my current application.
I have an sql database with a table holding users(UserID, Name), a table holding
I have a fusion-table holding a database of my clients. One column is the
I have an SSIS 2008 package that reads data from an Access database (OLEDB
I have a form that gets populated with data from the database. Before is

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.