A
A
ajlhimik2018-05-10 19:39:52
go
ajlhimik, 2018-05-10 19:39:52

Does it make sense to write your database using txt files in go?

Does it make sense to write your database using txt files in go, or will sql, postre and others be better in speed (not in convenience, and otherwise)? for details: I want to store an array with a name, brief information, links between elements and an address to a file with more voluminous information in RAM, each element will have its own separate file (or is it not necessary? Is it better to put everything in one? Or if you group them by areas - yes it will be better, it is unlikely that it will be necessary to open 2 files for 1 request), or is it better to put it in the database? by resources and processing time

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
danforth, 2018-05-10
@danforth

If you are asking this question, then you have no idea what awaits you. And there are many exciting problems waiting for you to solve.
Use SQLite or other embedded DBs.

C
chromimon, 2018-05-20
@chromimon

Look at BoltDB, an embedded key-value DBMS written in pure Go,
marvel at the coolness of the functionality and understand that you don’t need to write a bicycle.
If for practice - yes it makes sense.
If you just want to start using - use BoltDB, it's really cool.
PS:
The documentation for BoltDB describes the pros and cons of other alternatives,
maybe you will need not BoltDB itself, but its alternatives (unfortunately they are not in pure Go, which causes some compilation problems, so I prefer to use BoltDB)

D
devalone, 2018-05-10
@devalone

If you have some kind of specialized task that cannot be solved on existing databases (including NOSQL) and have experience in creating databases, then it will be faster and make sense, otherwise - no.

Q
qazar, 2018-05-18
@qazar

do you really think that writing a database, even as simple as key-value, is easier than taking something ready-made, time-tested, where there are already tools for solving problems that you may not even guess about now, but in general it’s better to write, it will be fun and exciting, a lot of useful experience

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question