C with database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sreenivasan alakappan

    C with database

    Hello,
    I want to know if it possible to write relational datebase
    application in C. I have so far seen File IO(Flat files). If so,
    please give me pointers on doing so.I think I did not go off the topic
    in this group. If so, please excuse me and direct me to the correct
    group.

    Thanks,
    Sreeni.
  • Malcolm

    #2
    Re: C with database


    "sreenivasa n alakappan" <deivanai_sri@h otmail.com> wrote in message[color=blue]
    > I want to know if it possible to write relational datebase
    > application in C.
    >[/color]
    The famous databases systems are probably written in C.

    You can implement a simple database using the stdio functions, in particular
    fseek() in conjunction with an index for fast access.

    Having said that, to get more than the absolute basics is a big job, because
    you have to define keys and record structures and implement a query system,
    all of which is rather hard to do.


    Comment

    • kal

      #3
      Re: C with database

      > > I want to know if it possible to write relational datebase[color=blue][color=green]
      > > application in C.
      > >[/color]
      > The famous databases systems are probably written in C.
      >
      > You can implement a simple database using the stdio functions, in particular
      > fseek() in conjunction with an index for fast access.
      >
      > Having said that, to get more than the absolute basics is a big job, because
      > you have to define keys and record structures and implement a query system,
      > all of which is rather hard to do.[/color]

      What he probably wants to know is how to access a relational database
      from within a C program.

      This is a platform specific question and so is off topic here.

      Generally you use one of the APIs (Application Programming Interfaces)
      provided by the database vendor. Most database vendors provide an
      API called "DBLibrary for C". Look this up in the documentation.

      P.S. If you are a windows hack look up DAO (for Jet/Access) or
      ADO (for SQL server). You probably may have to use C++ for these.

      Comment

      Working...