[NFBCS] C++ Query: Databases and CSV Files

Nathaniel Schmidt schmidty2244 at gmail.com
Sun Sep 13 23:39:29 UTC 2020


Hi all,

 

I am emailing about a query that is somewhat related to a programming
assignment I am working on at uni for an intro to programming subject,
written in C++.  So I am more looking for ideas than syntax, as I need to
demonstrate the latter myself so as to not become liable for collusion /
outsourcing.

 

The main aim of the distinction-level assessment being worked on is to
utilise the procedural programming paradigm, to create a primitive database
solution that will be able to collect data via console user input, writing
the data to and reading it from a CSV file.  The problem I have is one that
was predicted by my tutor, Ben Philip, namely that I am unsure how to
reliably update the created content in such a way as to be able to dump it
back into the file without running the risk of losing some of the previous
content.  So to be strictly accurate, hopefully not evaluating things at
face value too much, I believe the initial problem is more related to
reading than writing.

 

The only superficially viable solution that immediately springs to mind is
to try and load the file as a multi-dimensional dynamic array of
primitive-typed characters, which would theoretically allow me to interact
with the textual content as rows (cases) of data, and columns (as in
characters on each line of text, not columns in the data table).  But even a
basic Google search informs me that this could be difficult and unreliable,
since updating one dimension in accustom type such as a  vector would mean
updating every other dimension every single time.  Furthermore, I am unsure
as to whether this would limit me to working with ASCII-encoded plain text
files, or whether I could work with anything else.  Is the latter issue not
necessarily a concern, or should I use a wide character type (wchar_t) to
represent the data, so as to (hopefully) extend my solution to being able to
work with UTF-8 encoded files?

 

I'm still kind of in the design phase and have not yet written any code.
But the trimester is really starting to slip away so because I am keeping up
with most of the other content in this subject, I am now prioritising this
assessment to hopefully be able to obtain a higher unit grade if I can.  It
is, at the very least, a convention; and if not, at the very most a
requirement of the unit I am studying that the student should fairly
extensively make use of Deakin University's cross-platform, all-purpose
beginner's SDK, namely Splashkit <https://www.splashkit.io/> , for most of
their work.  So I think I can use the standard library to an certain extent
but Splashkit is to be the foundation of my work.

 

Would appreciate any suggestions any of you may have.

 

Kind regards,

 

Nathaniel

 

 

========================================

Nathaniel Schmidt

Undergraduate student

Bachelor of Computer Science (S306)

School of Information Technology

Faculty of Science, Engineering and Built Environment

Deakin University, Cloud campus

https://sync.deakin.edu.au/profiles/student/njschmidt/

 

Std. ID: 220493627

E: njschmidt at deakin.edu.au <mailto:njschmidt at deakin.edu.au> 

M: 0439591709

LinkedIn: https://www.linkedin.com/in/njsch/

GitHub: https://github.com/njsch/

Skype: nathaniel_schmidt1994

 



More information about the NFBCS mailing list