Discussion Board

Results 1 to 3 of 3

Hybrid View

  1. #1
    Registered User
    Join Date
    Feb 2008

    Suggestions required : what sort of buffer to pass between client/server and database


    I am working on client server architecture which interacts with a database.
    I am trying to create a database,which contains information about files.
    This database has only one table ,which would store this info.
    Table contains the following fields.

    typedef enum TDbFieldNames
    /** generic file information */

    I would like this database to be accessed through a client/server interface only and not directly.

    i.e, multiple applications could access this database through a client/server framework.
    If an Application wants some info,it would call client's interface,which in turn would talk to the server.
    server would then do a querry into the database and get this info.

    Server cannot predict which all fields the client wants info for.
    The querries are not predetermined/cached.

    App1 could ask for "select filename,filesize ,creationtime,modificationtime from table where size = 1024
    App2 could ask for "select filename,creationtime,modificationtime from table where format = 'video'

    I was thinking of a client interface/method to handle the querries from Application,
    which would take a buffer from client,the list of fields he is asking for and the condtion which should be executed by database to retrieve the record.

    I am assuming the condition which the client specifies is "eqalto" only,that means only one rowset is returned.

    Application would know how much buffer space to allocate,from the list of fields it's querring for,as its aware the max size each field would take.

    The problem I am facing is,what type this buffer should be,
    because at the server end the result of the querry could contain an int and a text and a real number,
    or in some other querry it could be a text and a text and a int.

    Discriptor's cannot be used as buffer's to store integer values(they need to converted to discriptor's),since the client might have querried for a field which is of type integer.

    I want the readfrom database client interface to be generic.

    What sort of buffer,client should create and call the client interface.
    How to send this buffer to server from client.
    If the result of the querry contains an integer or real,
    How could it be written into the buffer an integer as an integer only,a real number as real number only and sent back to client.


  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Suggestions required : what sort of buffer to pass between client/server and data

    Before you re-invent the wheel, or a part of it (a pie-slice maybe?), note that there is support for shared database access in Symbian: check what happens if you use RDb (instead RFs) with RDbNamedDatabase.

  3. #3
    Registered User
    Join Date
    Feb 2008

    Re: Suggestions required : what sort of buffer to pass between client/server and data

    Shared database can be used.
    But I want to come up with an architecture where there are multiple application's and the data they want is maintained in a database and the applications should not know about how to form a sql querry.Forming a sql querry should be the job of a server.In this way I want to abstract the appplications from forming sql querries.

Similar Threads

  1. Sort Contact database
    By bernie31 in forum Symbian
    Replies: 1
    Last Post: 2008-09-17, 09:59
  2. Receiving MMS Using Phone And Pass It to Database
    By bagas199 in forum General Messaging
    Replies: 1
    Last Post: 2004-10-12, 09:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts