Thread: Any Stand alone DataBase?

  1. #1
    Infant of C
    Join Date
    May 2010
    Location
    Karachi, Pakistan
    Posts
    118

    Any Stand alone DataBase?

    I want to develop a small utility that insert and fetch student's data to and from a simple data table!
    And most important is that I dont want the user to become depend upon any specific data base (like MySQL) but I want to use any C or may be C++ library that can work as a stand alone database means having no external dependencies with it!
    Can any one please help me for this?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    So what's wrong with a simple text file in say CSV format -> Comma-separated values - Wikipedia, the free encyclopedia
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Infant of C
    Join Date
    May 2010
    Location
    Karachi, Pakistan
    Posts
    118
    Quit help full! But What if the data grows and reaches to a count of 10000 or may be greater! it ought to become slow if I search some thing like this:

    SELECT * FROM student WHERE Basic_Subject LIKE "Chemistry";

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Hey, you're the one who doesn't want to depend on a database.

    If you want good performance and a generic query interface, then expect to write quite a lot of code yourself.

    OTOH - SQLite Home Page
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    If you want to learn and or practice working with database code, then this is perfect to take on and code one yourself! You'll learn a TON I'm sure!

    If you want to make something as a product instead, why try and re-invent the wheel? SQLite seems perfect for a standalone database.

  6. #6
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    SQLite is wonderful, and comes as a single C file that you just insert into your project. I use it to record student scores in a program we use in the school I work in. Writes everything to a normal file but has enough power and interface to just be used as an ordinary SQL database and you never know how the database is stored.

    It even works well with multiple concurrent writers (you have to write the code to properly retry but I don't have any problems with 30+ simultaneous users) writing to a shared network file as the "database". And I can just throw standardised SQL at it from the programming end and it all just works. If SQLite ever isn't sufficient, I can just swap out the database code and still execute those same SQL statements against, say, MySQL, PostgreSQL, MS-SQL, etc. and see the same results.

    I'd go for SQLite, personally. If nothing else, it's a wonderfully simple interface to an SQL database that you can always upgrade if performance starts to drop but, to be honest, I don't see it happening for casual use. To my knowledge, Opera uses an SQLite database for it's mail stores and I have about 8Gb of mail spread over 10 years of archives in my copy of Opera and it still does narrow-as-you-type search over the body of ALL those emails so fast it's scary. Lots of games use it for their savegame format too.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  7. #7
    Infant of C
    Join Date
    May 2010
    Location
    Karachi, Pakistan
    Posts
    118
    Yes I also think SQLite would help!
    Thanks a lot for advice!
    Yes But a last thing to ask! If go around for an application on .NET espacially in C# they have provide a .NET version of SQLite known as system.Data.SQLite As I found it here!
    would I need these dependencies to be installed on the target system also in this case?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stand alone app and .dll's
    By earth_angel in forum Windows Programming
    Replies: 4
    Last Post: 08-08-2005, 01:05 PM
  2. What do these stand for?
    By paper-pant in forum C++ Programming
    Replies: 6
    Last Post: 10-05-2004, 12:50 PM
  3. What's the 'f' stand for?
    By Krak in forum Game Programming
    Replies: 4
    Last Post: 09-25-2003, 02:24 PM
  4. what does vbe stand for?
    By stupid_mutt in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-15-2001, 05:53 PM