Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualalnite

Posted 09 February 2013 - 05:35 PM

I would have a text file with the values to be stored to the database.  For example:

 

first_name: "John"

last_name: "Smith"

 

Then it reads this text file, parses the column names, checks if the column names actually exists in the database, then stores them.  It creates a new entry if the values do not exist.  It updates the entry if it already existed.  It can also delete an entry based on a certain criteria, for example, by first_name.

 

So I would use it like this:

 

// Initialize db bla, bla bla

db_whatever.insert("datafile");

db_whatever.update("datafile");

db_whatever.delete("first_name", "John");

 

I was thinking DBRecord sounds the closest, but it doesn't represent the data.  It inserts data into database.

 

edit: It may also extract data from database.


#1alnite

Posted 09 February 2013 - 05:32 PM

I would have a text file with the values to be stored to the database.  For example:

 

first_name: "John"

last_name: "Smith"

 

Then it reads this text file, parses the column names, checks if the column names actually exists in the database, then stores them.  It creates a new entry if the values do not exist.  It updates the entry if it already existed.  It can also delete an entry based on a certain criteria, for example, by first_name.

 

So I would use it like this:

 

// Initialize db bla, bla bla

db_whatever.insert("datafile");

db_whatever.update("datafile");

db_whatever.delete("first_name", "John");

 

I was thinking DBRecord sounds the closest, but it doesn't represent the data.  It inserts data into database.


PARTNERS