-4

I'm trying to develop a music player using Qt, QML & CPP. I'm new to this kind of development (related to multimedia). I want some insights from you on how other Music Players work.

My first hurdle is how should I maintain the Library Info.? -- All the Metadata of each file, their locations etc. I thought of having a Database. As I'm using Qt, It provides SQLite internally. So, I'm opting for creating a Database which contains all the metadata of each music file (.mp3) Will this be feasible if we have lot of mp3 files. Say, 40K files. So, it comes to almost 40K records in a DB table. Then will this SQLite works well ? Are there any alternatives for maintaining the media library?

Hope I'm clear, I can elaborate if specified.

Thanks in Advance, inblueswithu

inblueswithu
  • 953
  • 2
  • 18
  • 29
  • On StackOverflow, you can ask only 1 question per post. Is your question "Can SQLite support 40k rows in a database?". If so, then the answer is yes. – sashoalm Sep 13 '13 at 07:15
  • My intention in asking this question is, if opting SQLite db for this purpose is viable or not. 40K rows etc is just an example that I made. Or are there any advanced ways of maintaining library?! – inblueswithu Sep 13 '13 at 07:43
  • So your question is "Is using SQLite for a database viable?". Well yes, **that's what it's made for**. This question is pointless and rhetorical then, you knew the answer even before you asked it. – sashoalm Sep 13 '13 at 07:45
  • sshoalm, might be. As I said, I'm asking for opinions on using -- how good it is to use SQLite DB, As I'm new to this, I wanted to know is this the way it is done in music players. By the way, as you said, I didn't know the answer for sure already. I was speculating with that. I needed opinions in this question. If I was really bad in asking question and hurting the process/sentiments here. I'm really sorry & I didn't comply with the rules around here. – inblueswithu Sep 13 '13 at 07:57
  • @inblueswithu No problem, just read the [FAQ], it should clear up things for you :) – sashoalm Sep 13 '13 at 08:36

2 Answers2

2

Then will this SQLite works well ? Are there any alternatives for maintaining the media library?

In short, yes, SQLite will work.

There are various media players like this this out there using SQLite for embedded systems, and they work fine for this requirement. The limits are documented on the official website.

If you plan to have a QtQML application, I would suggest using the QtSql module for handling the database, and QtMultimedia for the audio part. I would also recommend QtQuick controls for the UI part.

Here you can find the module documentations for those:

QtSql: https://qt-project.org/doc/qt-5.1/qtsql/qtsql-index.html

QtMultimedia: http://qt-project.org/doc/qt-5.1/qtmultimedia/qtmultimedia-index.html

QtQuick Controls: http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html

László Papp
  • 51,870
  • 39
  • 111
  • 135
1

Yes, SQLite can support 40k rows in a table. You can see http://www.sqlite.org/limits.html for more info about its limits.

sashoalm
  • 75,001
  • 122
  • 434
  • 781