Hello everyone..I am a newbie in DANIWEB..I really need your help guys regarding the topic i stated in the title..I am trying to create a payroll system..The system will get the data from the database, compute the NET and GROSS SALARY then afterwards save it back to the database.It is just a simple, very simple system. But i really don't have any idea to start..Thanks everyone..I will appreciate even just a simple help you will give..

Recommended Answers

All 4 Replies

No one would ever want to implement a database using text file. The work involve are just very tedious. First of all, what are the 'data' that will be stored in your database? If it is all of a user defined structure, you can consider storing them as a binary file. Here's an example of writing structure into a file http://www.java2s.com/Code/C/Structure/Writestructureintofile.htm
For a lightweight database, I would recommend SQLite as they are lightweight and simple to use (they store your data in binary files too!) http://www.sqlite.org/

Hello there,

I was wondering if a database management library would be something nice, 'cos it won't be necessary to install a database management system before using a program that uses a database.
So, I've developed a database management library, DBL, and I would like to share it with C++ programmers. As soon as I can I intend to share the source-code as well.
There is also a DBL Command-Line Interface for download.

http://sites.google.com/site/rcorcs/download/system-softwares
sites.google.com/site/rcorcs/download/system-softwares

I reckon it might be useful for loads of C++ programmers =)

Cheers

commented: It's getting to be a bit much -1

I will not implement the system that i want to do..It's just that I need it in our project.thanks!

People either haven't taken a C++ course or they've forgotten how most school courses are structured. Clearly this user is trying to implement a database via textfile because the class is requiring it.

Therefore, we should be trying to find a solution to use a textfile as a database as it's good practice for string manip and basic I/O functionality.

Simply put, the user should probably just create several I/O functions that are mirrors of each other in order to make it easier to develop a mock-database. The complexity of the database changes the complexity of the problem. But in general, one can rely on some fundamental loops in order to handle their input/output streams.

The easiest way is to output your text stream with the same delimiters between each word. Then with a while loop and an array, absorb your objects/strings/input however it's structured.

More complex tables can be created, but require a hell of a lot more processing.

Lastly, if you're forced to create a text database, you could consider creating new "pages" as separate databases or even new pages as separate columns. With the right folder creation you could have a really heavy weight, but organized database. Your teacher likely wants you to use a single file. So, just use these main functions in your database:

EOF, GOOD, FAIL, GETLINE (with caution), GET (with caution). Those five can check for end of file, ensure file is good, read in values, and more.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.