Are you using a professional/commercal database? If so nvoigt already answered your point.
Or do you want to create a simple database yourself?
You could make a structure or class to hold all the data for each object.
Then make an array or whatever you want with this class.
Using FILE * 's you can read and write entier arrays at once
That will make an array, write it to a file.
FILE * myfile;
for( i=0 ; i<500 ; i++)
myfile = fopen("database","wb");//write/binary
fwrite(array,sizeof(int),500,myfile); //this should write the whole array to the text file
fclose(myfile); //close the file.
//do stuff here
myfile = fopen("database","rb"); //open the file for reading
fread(array2,sizeof(int),500,myfile); //read in our array we wrote earlier
Then the file is closed.
The file can then be opened, and read in with one line