News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

DataBase

Started by Farabi, December 11, 2012, 02:45:40 PM

Previous topic - Next topic

Farabi

Here is my database source code from the old MASM32 forum. I hope it will be usefull for anyone else.

Here is example application that use the database.
http://ompldr.org/vYTVlMA/fMed.zip

The database is simple and fast, and also free.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

Farabi

Here is the C dll version
http://ompldr.org/vY3gwag/fDatabase.zip
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

Magnum

Farabi,

I don't understand how to use your database program.

Can you explain what it does ?

Thanks,
               Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Farabi

Quote from: Magnum on December 23, 2012, 01:18:02 PM
Farabi,

I don't understand how to use your database program.

Can you explain what it does ?

Thanks,
               Andy

It was managing all of the data on an array and store it on a memory. For example if you had many files and you want to store it on a single file, you can load your files to the database and add it and pack it to be stored later. The example on how to use it is on the attachment on the first post. You can add a data, delete, and insert a data.

If you downloaded the fmed application you can see how it is used for, the disease data is stored on a database that I created to view later by the users. It is a simple database engine.

Here is a quote from the manual
Quote
   -fDataBaseGetData
   Get the database entry data, the return value is fDataB structure where the data is pointed at return value + 8
   -fDataBaseAdd lpStruct:dword,nSize:dword,nType:dword,lpData:dword
   Add Database entry into the database
   -fDataBaseInsert lpStruct:dword,nSize:dword,nType:dword,lpData:dword,nPosition:dword
   Insert Database entry into the database
   -fDataBaseDelete lpStruct:dword,nPosition:dword
   Delete Database entry pointed by nPosition
   -fDataBaseEdit lpStruct:dword,nSize:dword,nType:dword,lpData:dword,nPosition:dword
   Edit database entry and the original entry is destroyed automatically
   -fDataBaseDestroy lpStruct:dword
   Destroy the whole database
   -fDataBaseWrite lpStruct:dword, lpFileName:dword
   Write the database to disk
   -fDataBaseLoad lpStruct:dword,lpFileName:dword
   Load database from disk
   -fDataBaseLoadFromMemory lpStruct:dword,lpData:dword,nSize:Dword
   Load database from memory
   

DATA_BINARY    equ 0
DATA_TEXT      equ 1
DATA_PICTURE   equ 2

fDataB struct
   nSize    dword 0
   nType    dword 0
   lpData   dword 0
fDataB ends

fDataBFile struct
   nData   dword 0
   lpData   dword 0
fDataBFile ends


Example:

.data
DataBase fDataBFile <0>

.code

Invoke fDataBaseAdd,addr DataBase,5,DATA_TEXT,CADD("Test"),   ; Add an entry to database
Invoke fDataBaseWrite,addr DataBase,CADD("Data.fdb") ; Write it to disk

Just it. Pretty straight forward is not it?
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

Farabi

Here, I make a test to load the data for 100 milion times. It took only half a second. I'll provide the source if you dont believe me, but will not release it to public. Just demonstration.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165