Hi, I've been thinking of ways of creating an application that involves working with data, what would be the best way to accomplish this?

With the JavaDB, MySQL or plain text files? The project is fairly simple, the idea at least. It's a set of records for students, each student has a record of activities they've done during the period of say 4 years, daily activities. I need a way for them to keep record of the things they've done, and if possible transfer this records if they decide to deploy the application onto another computer. If I were to use JavaDB, would it be dificult to port the app? What would be the best way to approach this?

Dani AI

Generated

For a student-activities app the right choice depends on three things: portability, concurrency, and how many clients will access the data. As pointed out, serverless/embedded engines (JavaDB/Derby, HSQLDB, SQLite) give the easiest portability because the data lives in a few files you can copy to another machine. choosing MySQL is reasonable if you already know it or expect multiple users and stronger concurrency, but it requires a server install or a bundled portable MySQL to move between computers.

Practical design and deployment tips: normalize into at least Students and Activities tables; store activity_date in a proper date/time column and index (student_id, activity_date) for fast lookups; keep large binary data out of the tables and store file paths instead. Use transactions and prepared statements to avoid corruption. For portability implement export/import: mysqldump or CSV for MySQL, and file-copy (after a clean shutdown) for embedded DBs. Note that many embedded engines lock their files while running, so copying a live file can corrupt the dataset.

Recommended workflow: prototype with an embedded DB to simplify packaging, then migrate to MySQL only if you need server features. Keep JDBC/driver jars bundled, maintain schema migration scripts, and add a simple export tool for user transfers. See Apache Derby for JavaDB details and for driver/connection options.

Recommended Answers

All 2 Replies

Plain text is OK if you looking for management of small amount of data and not necessary structured/organized. For the above task database would be suitable and I would go for serverless/embedded database like JavaDB, HSQLDB or SQLite then MySQL that need server installation as it gives you mobility

Sounds good, I'll go ahead and start with MySQL, I have experience with it from my PHP projects. Thanks for the input

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.