locked
Entity Framework, table size limit RRS feed

  • Question

  • Hi, I've been reading some articles about Entity Framework and it seems nice. but I had a question: I'm about to build is a Movie Library and I'm to use IMDB's offline databases. The problem is some of the tables are quite large (i.e. about 20 million rows). is this going to be a problem when mapping the data rows to objects?

    Monday, July 4, 2011 1:34 AM

Answers

  • Hi Babak;

    I have modified your query so that the searching of the name is done on the server and what is returned is all movie titles that contain the word Life in it.

    string keyword = "Life";
     
    var resultSet = (from title in imdbContext.MovieTitles
             where title.name.Contains(Keyword)
             select d).ToList();
    


    Fernando

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, July 5, 2011 3:29 AM

All replies

  • Hi Babk;

    First you need to make sure that the database engine that is used by IMDb is supported by the Entity Framework. Creating the EF model is not be a problem. When querying the database you will have no problem as long as you filter the request. The amount of data that can be loaded into the local system is a function of the amount of memory available.

     


    Fernando

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Monday, July 4, 2011 3:26 AM
  • Thank you Fernandoo Soto for the fast reply,

    Actually I've imported the data into MSSqlServer. I'm sure not going to display the full list of all the Movie Titles in the database but provide some searching capabilities to find an exact Title or nearest matching ones. Now there is another question, lets say the user searches for the string "Life"; How am I going to search the whole database if I'm not to load it all into memory? I suppose I could use some query like:

     

    string keyword = "Life";

    var resultSet = from title in imdbContext.MovieTitles.ToList()
                          where title.name.Equals(Keyword)
                          select d;

     

    Now doesn't such query first load all the data into memory and then search into it? If so, there should be a way for me to filter the database rows before they are mapped to objects and into memory.

    Tuesday, July 5, 2011 12:38 AM
  • Hi Babak;

    I have modified your query so that the searching of the name is done on the server and what is returned is all movie titles that contain the word Life in it.

    string keyword = "Life";
     
    var resultSet = (from title in imdbContext.MovieTitles
             where title.name.Contains(Keyword)
             select d).ToList();
    


    Fernando

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, July 5, 2011 3:29 AM