Search code examples
asp.netweb-applicationsdb4o

Using Db4o database for asp.net web store


I have a web application which displays set of components in the form of grid view and gives the user ability to buy and download components from the web store. I'm considering using db4o for this ? What is your suggestion ? How is the support for db4o in visual studio 2008 ?

Can i have some tutorials/links on aligning datasource/databinding of gridview with db4o ?? How to start with db4o, create a table, using stored procedures / or similar concepts of it , connecting to database ? retrieving the data ?

If possible giving a example code would be of great help

I'm using visual studio 2008, asp.net with c#

Help me out.

Thanks


Solution

  • That's a very broad question.

    Building a web store. I'm considering using db4o for this? What is your suggestion?

    It's certainly possible, although more information is required. The expected load, data size etc. Try it out?

    How is the support for db4o in visual studio 2008? What do you understand with vs 2008 support? db4o is basically just an library. Add it to your project and start using it. There no special visual studio support required. When you are referring to a 'database'-explorer kind of support: There's a VS 2008 plugin for db4o which allows you to explore a db4o database. However its not really good.

    Can I have some tutorials/links on aligning datasource/databinding of gridview with db4o? Do you mean the ASP.NEt grid-view controls? I don't know anything about that. I can only refer to this section about web-apps. It only contains some basic issues with it and doesn't cover framework specific stuff.

    How to start with db4o, create a table, using stored procedures / or similar concepts of it , connecting to database ?

    Open the database, store a few objects, query for a few objects:

    using (IObjectContainer container = Db4oEmbedded.OpenFile("databaseFile.db4o"))
    {
            // store object
            var pilot = new Pilot("Joe");
            container.Store(pilot);
    
            // query for objects
            var pilots = from Pilot p in container
                 where p.Name == "Joe"
                 select p;
    
           // update an object
           var pilotToUpdate = pilots.First();
           pilotToUpdate.Name = "New Name";
           container.Store(pilotToUpdate);
    }
    

    Here's a one page overview of the basic operations. Then next step is probably to evaluate if db4o is even suitable. Integrate db4o into your web-framework and look if it works. Then start to model your domain-classes in a clean way and see if it can be stored / queried easily with db4o.