While researching random stuff about databases, the question above just happened to pop up in my head. So, why use an rdbms in conjunction with SQL instead of creating a GUI or console based Database with c++? What are the advantages and disadvantages of both rdbms' and c++ developed databases?
Asked
Active
Viewed 148 times
-3
-
"why did I get -3" : it is not so far a stretch to perceive this question as soliciting opinions rather than facts (or to believe that will be the end result). And some are more eager than others to "act" upon this, rather than just let it be. – Erwin Smout Aug 11 '16 at 07:02
-
what does c++ has to do with development of database ? Are you implying that no other language can offer same advantages that C++ provides when writing a database. Are actually inquiring whether there are databases written in c++ that can run in embedded form ? – Sikorski Oct 05 '16 at 13:26
-
RDBMS is a proven solution, reinventing a wheel (c++ database) is not an option unless you actually improve upon some of the aspects of the wheel (nosql). – Sikorski Oct 05 '16 at 13:27
1 Answers
2
I've lived in both worlds, having coded data storage by hand in C and C++, and having used SQL databases, so I think I can answer this one.
A relational database management system (RDBMS) provides data integrity guarantees that are difficult to create yourself. If your application is writing to a flat file and crashes, is the flat file still usable? What if it is writing coordinated changes to multiple files and crashes? Are the files still consistent with each other?
The guarantees typically given by an RDBMS are remembered through the ACID mnemonic:
- A - Atomic
- C - Consistent
- I - Isoluation
- D - Durable
See this SO answer for more about the ACID guarantees.

Community
- 1
- 1

Wayne Conrad
- 103,207
- 26
- 155
- 191
-
-
@PaulLee I don't know why someone downvoted--downvoters aren't required to give reasons. Your question has some votes to close it, though, which might help you to know how it could be improved. The votes are for "unclear what you are asking," and for "too broad." – Wayne Conrad Aug 10 '16 at 23:35