amantiwari1/youtube-downloader-desktop

Close the app then save data ( sqlite3 ), Open app that could data back through sqlite3

Closed this issue · 19 comments

We will use library called SQLALCHEMY. this library allows to make CRUD easier and ORM for create table easier and MVC is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller.

I will create models folder to create new table, we have already view named src folder

Why you want use a database?

What do you want save on it?

all details like title, link , image link etc !!

These value are tiny and isn't persistent data.

Database is to store a large amount of data which need to be stored even in the end of the application.

We data dont match with it. It will increase the complexity of the app without needed

It will turn more difficult to install the application, because the user will need to have a database and a orm installed.

I disagree with you, but you can argue

User doesnt need install database like mysql server etc but python can create database called data.db or data.sqlite3 just like data.json

what do you mean orm installed?

SQLALCHEMY has built in ORM like we dont need query like select * from youtube instead youtube.fetchall() which is a lot of save time.

why do we need database? because user doesnt find url and copy paste again if they close the app and data is gone

ORM allow us to reduce complexity of the app. you shoud to know about ORM!!

I already see ORM, but I don't have used sqlite3, but anyway, I think that sqlite3 will create a sql server in the machine, the ORM will abstract the sql layer, but the queries yet will be a sql in the end. Right?

ORM allow us to reduce complexity of the app. you shoud to know about ORM!!

ORM abstracts the sql layer. This is useful for systems which a large database, which isn't we case.

User doesnt need install database like mysql server etc but python can create database called data.db or data.sqlite3 just like data.json

So this isn't a sql database, is only data saved in json format without a server

i think data.db doesnt need to start server

google said

SQLite Is Serverless
SQLite is an example of a classic serverless database engine. With SQLite, there are no other processes, threads, machines, or
other mechanisms (apart from host computer OS and filesystem) to help provide database services or implementation.
There really is no server

you should watch it https://www.youtube.com/watch?v=OT5qJBINiJY

if database is not our case then tell me what is your solution?

if there is no solution then it is better data.db

google said again

SQLite does NOT require a server to run. SQLite database is integrated with the application that accesses the database. The applications interact with the SQLite database read and write directly from the database files stored on disk.

what do you think?

google said again

SQLite does NOT require a server to run. SQLite database is integrated with the application that accesses the database. The applications interact with the SQLite database read and write directly from the database files stored on disk.

I didn't know about it. I was guessing that SQLite works in the same way as others db, sorry for the ignorance.

if database is not our case then tell me what is your solution?

First, you should tell to me what the problem that raises you to want to add a database? The reason is only to can recovery the inserted url?

what do you mean? I don't get it

what do you mean? I don't get it

The decision of use or not a database is a trade-off, it has pros and cons. For me, it has more negative results than positive. Because it gives more complexity to our software.

The positive point is that the user can recover the inserted url. I think that this is a good feature, but isn't good sufficient to convince me to use a database.

do you disagree with me?

we don't know whether it is complexity of the app or not
we have to try it experiment in other branch

in fact sqlite3 is faster than mysql

Great news it has been new feature to youtube downloader gui
i am going to close it