How to make .db files? (Solved)

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

How to make .db files? (Solved)

Post by Tippe »

Hi.

I can use UEXTRACT to unpack/extract a .db file.

In my example use it unpacks a .sql file.
I want to edit this file manually.
After editing I want to pack it again into a .db file.

How do I do this?

Thanks

Bionic Puppy 64bit.
Won't use another one.

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: Question about .db files

Post by vtpup »

Tippe wrote: Tue Mar 12, 2024 1:06 am

Hi.

I can use UEXTRACT to unpack/extract a .db file.

In my example use it unpacks a .sql file.
I want to edit this file manually.
After editing I want to pack it again into a .db file.

How do I do this?

Thanks

Many different programs create ".db" extension named files, (it's a common name but not a standard format) and these can take many different proprietary formats. For anyone to answer this, you would have to specify which program and version you are trying to modify .db files for, and then find information about what specific file format that is, then find an application that will write your .sql modified files back to that format.

If it's possible to edit directly in the .db file itself without conversion to .sql, that might actually be easier. That would be possible if the files are ASCII text files, and you understood the format requirements, or if there was a dedicated editor that could handle them. Answering this will all probably take some online research on your part, unless somebody here has experience with your program and its formats.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: Question about .db files

Post by Tippe »

Hi, and thanks for the reply.

It is the .db file from FreetuxTV.
FreetuxTV has lots of TV and Radio stations that doesn't work anymore.
My intention was -at least- to sort out the not working German TV and Radio stations
and to remove them from the .sql file, which is editable in Geany for example.
After that I wanted to rebuild the .db file, so it will be accepted by FreetuxTV.

FreetuxTV has no option to delete single stations, only groups of stations can be removed. :(

Again, thanks.

Bionic Puppy 64bit.
Won't use another one.

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files? (Solved)

Post by vtpup »

I see you marked this thread "Solved" so was there a solution?

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: How to make .db files? (Solved)

Post by Tippe »

vtpup wrote: Mon Mar 25, 2024 11:42 pm

I see you marked this thread "Solved" so was there a solution?

No, i didn't mark this as "Solved". :(

Bionic Puppy 64bit.
Won't use another one.

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files? (Solved)

Post by vtpup »

Weird!

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files?

Post by vtpup »

Looks like an unidentified moderator has interfered with the title -- this has happened to me as well, and it's extremely irritating!

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files?

Post by vtpup »

Looks like an unidentified moderator has interfered with the title -- this has happened to me as well lately, and it's extremely irritating!

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files?

Post by vtpup »

Something weird is going on duplicating my posts as well.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
MochiMoppel
Posts: 1243
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 444 times

Re: How to make .db files?

Post by MochiMoppel »

vtpup wrote: Tue Mar 26, 2024 1:25 am

Something weird is going on duplicating my posts as well.

Not a duplication.
Apparently you tried to edit your post 4 minutes later but created a new post instead:
"Looks like an unidentified moderator has interfered with the title -- this has happened to me as well lately, and it's extremely irritating!"

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: How to make .db files? (Solved)

Post by vtpup »

Sorry if the double post was something I did inadvertently, this new laptop's touchpad is problematic and overly sensitive and I occasionally brush it causing unintended results.

But, this thread's title wording and the addition of the (Solved) to the title had nothing to do with me, and apparently the OP did not do that either.

I have also had other thread titles changed recently, without notice, and anonymously. I assumed it was a moderator's change. I'm a moderator on other fora and elsewhere, unless someone's post is in clear violation of a rule, we don't change a post in any way without first contacting them, giving a reason for a any non-rule desired change and allowing them to make any requested change themselves. This is respectful to contributors who are not breaking any rule.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
JakeSFR
Posts: 277
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: How to make .db files? (Solved)

Post by JakeSFR »

If UExtract was able to "unpack" it, it was just an SQLite database.

To dump database to an SQL file:

Code: Select all

sqlite3 input.db .dump > output.sql

To do the opposite and turn an SQL file back into database:

Code: Select all

sqlite3 output.db < input.sql

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: How to make .db files? (Solved)

Post by Tippe »

Hi.

@JakeSFR

Made a quick test:

Code: Select all

sqlite3 input.db .dump > output.sql

Doesn't work. Returns/extracts only this:

Code: Select all

SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
sqlite> 
sqlite> 

When extracting with Uextract it returns a file with 1213 lines of XML code.

But this one works:

Code: Select all

sqlite3 output.db < input.sql

It returns a .db file which seems to be loaded properly by FreeTuxTV, even though it is a bit smaller in Kb.
40 Kb compared to 104 Kb after re-packing with sqlite3.

Thanks! :thumbup:

I think this is solved now for real.

Bionic Puppy 64bit.
Won't use another one.

Post Reply

Return to “Beginners Help”