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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:39:06+00:00 2026-05-21T05:39:06+00:00

Our database includes 4,000,000 records (sql server) and it’s physical size is 550 MB

  • 0

Our database includes 4,000,000 records (sql server) and it’s physical size is 550 MB .
Entities in database are related each other as graph style. When i load an entity from db with 5 level depth there is a problem (all records are loaded).

  • Is there any mechanism like Entity Framework( Include(“MyProperty.ItsProperty”))

What is the best Types for using with db4O databases?

  • Is there any issue for Guid, Generic Collections?

  • Is there any best practise for WebApplication with db4o? Session Containers+EmbeddedDb4ODb or Client/ServerDb4O?

Thx for help..

Thx for good explanation. But i want to give my exact problem as a sample:
I have three entities: (N-N relationship. B is an intersection Entity. Concept:Graph)


class A 
{
 public B[] BList;
 public int Number;
 public R R;
}
class B
{
 public A A;
 public C C;
 public D D;
 public int Number;
}
class C
{
  public B[] BList;
  public E E;
  public F F;
  public int Number; 
}

I want to query dbContext.A.Include(“BList.C.BList.A”).Include(“BList.C.E.G”).Where(….)

I want to get           :A.BList.C.BList.A.R
But I dont want to get  :A.R
I want to get           :A.BList.C.E.G
But I dont want to get  :A.BList.C.F
I want to get           :A.BList.C.E.G
But I dont want get     :A.BList.D

Note:this requirements can change a query to another query

Extra question is there any possibility to load
A.BList[@Number<120].C.BList.A[@Number>100] Super syntax 🙂

  • 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-21T05:39:06+00:00Added an answer on May 21, 2026 at 5:39 am

    Activation: As you said db4o uses it’s activation-mechanism to control which objects are loaded. To prevent that to many objects are loaded there are different strategies.

    • Lower the global default activation-depth: configuration.Common.ActivationDepth = 2 Then use the strategies below to activate objects on need.
    • Use class-specific activation configuration like cascading activation, minimum and maximun activation-depth etc.
    • Activate objects explicit on demand: container.Activate(theObject,5)

    However all these stuff is rather painful on complex object graphs. The only strategy to get away from that pain is transparent activation. Create an attribute like TransparentlyActivated. Use this attribute to mark your stored classes. Then use the db4otool to enhance your classes. Add the db4otool-command to the Post-Build events in Visual Studio: Like 'PathTo\Db4oTool.exe -ta -debug -by-attribute:YourNamespace.TransparentlyActivated $(TargetPath)

    Guid, Generic Collections:
    No (in Version 7.12 or 8.0). However if you store your own structs: Those are handled very poorly by db4o

    WebApplication: I recommend an embedded-container, and then a session-container for each request.

    Update for extended question part

    To your case. For such complex activation schema I would use transparent activation.
    I assume you are using properties and not public fields in your real scenario, otherwise transparent persistence doesn’t work.

    The transparent activation basically loads an object in the moment a method/property is called the first. So when you access the property A.R then A itself it loaded, but not the referenced objects. I just go through a few of you access patterns to show what I mean:

    Getting ‘A.BList.C.BList.A.R’

    • A is loaded when you access A.BList. The BList array is filled with unactivate objects
    • You keep navigating further to BList.C. At this moment the BList object is loaded
    • Then you access C.BList. db4o loads the C-object
    • And so on and so forth.

    So when you get ‘A.BList.C.BList.A.R’ then ‘A.R’ isn’t loaded

    A unloaded object is represented by an ’empty’-shell object, which has all values set to null or the default value. Arrays are always fully loaded, but first filled with unactivated objects.

    Note that theres no real query syntax to do some kind of elaborate load requests. You load your start object and then pull stuff in as you need it.

    I also need to mention that this kind of access will perform terrible over the network with db4o.

    Yet another hint. If you want to do elaborate work on a graph-structure, you also should take a look at graph databases, like Neo4J or Sones Graph DB

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

Sidebar

Related Questions

Our database server is a SQL 2008 server. My colleagues all have XP service
We are moving our database server to a bigger box. I have several databases
I'd like to display records from our database in a listview - but retrieves
i've got a commenting system in our database. Just like stackoverflow -> each post
I want to use lucene.net to index records in our database. The records are
Our current database layout for store inventory includes a table that houses a record
The database of our web application includes two tables: States (idStates, State, Lat, Long)
How do you manage your sql server database build/deploy/migrate for visual studio projects? We
We have scalar functions in our database for returning things like number of tasks
We have a whole bunch of DLLs that give us access to our database

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.