Lazarus
Programming => Databases => Topic started by: lazpas on August 04, 2021, 10:18:39 am
-
Where is the open source small network database? I want to learn the principle.
Thanks.
-
I don't understand your question.
Firebird and SQLite is an open source small network database.
-
Where is the open source small network database? I want to learn the principle.
Thanks.
Firebird would be your best option:
http://firebirdsql.org/en/firebird-rdbms/
-
I don't understand your question.
Firebird and SQLite is an open source small network database.
Thanks.
sqlite is not a network database. Firebird is very large. I am a newbie. :)
-
sqlite is not a network database. Firebird is very large. I am a newbie. :)
Please qualify what large is acceptable and what not. This is all too vague. Most open source database systems run fine on an original raspberry pi.
-
Where is the open source small network database? I want to learn the principle.
Thanks.
Firebird would be your best option:
http://firebirdsql.org/en/firebird-rdbms/
Thank you.
Firebird is very good.But it is large,and I don't know how to C++.I am a newbie.
-
Is there a pascal language?
-
sqlite is not a network database. Firebird is very large. I am a newbie. :)
Please qualify what large is acceptable and what not. This is all too vague. Most open source database systems run fine on an original raspberry pi.
Thanks for reply.
I think, as little code as possible, a framework, including network, file io, thread, and possibly functions. basic skills.
-
I don't understand your question.
Firebird and SQLite is an open source small network database.
Thanks.
sqlite is not a network database. Firebird is very large. I am a newbie. :)
Where is the open source small network database? I want to learn the principle.
Thanks.
Firebird would be your best option:
http://firebirdsql.org/en/firebird-rdbms/
Thank you.
Firebird is very good.But it is large,and I don't know how to C++.I am a newbie.
Is there a pascal language?
sqlite is not a network database. Firebird is very large. I am a newbie. :)
Please qualify what large is acceptable and what not. This is all too vague. Most open source database systems run fine on an original raspberry pi.
Thanks for reply.
I think, as little code as possible, a framework, including network, file io, thread, and possibly functions. basic skills.
Lighter than Firebird, only if you would use an old xBase solution, such as DBase or Paradox.
And they have Pascal source code:
https://wiki.freepascal.org/Lazarus_Tdbf_Tutorial
https://wiki.freepascal.org/TParadoxDataSet
-
Lighter than Firebird, only if you would use an old xBase solution, such as DBase or Paradox.
And they have Pascal source code:
https://wiki.freepascal.org/Lazarus_Tdbf_Tutorial
https://wiki.freepascal.org/TParadoxDataSet
Thanks for help. :)
-
Thank you.
Firebird is very good.But it is large,and I don't know how to C++.I am a newbie.
[/quote]
You're very vague. You don't need C++ to use Firebird. Also Firebird can also use embedded. That's not large.
But yes, you can build a large database with it.
-
Thank you.
Firebird is very good.But it is large,and I don't know how to C++.I am a newbie.
You're very vague. You don't need C++ to use Firebird. Also Firebird can also use embedded. That's not large.
But yes, you can build a large database with it.
[/quote]
Hi,mangakissa
My English is bad,sorry.I use online translation.
I mean to learn client-server database principles.How to make a client-server database.
-
I have found these
https://github.com/ggaughan/ThinkSQL
https://sourceforge.net/projects/tpflashfiler/
-
I have found these
https://github.com/ggaughan/ThinkSQL
https://sourceforge.net/projects/tpflashfiler/
Have you actually read the description that goes with ThinkSQL?
The source code is linear per se, but while writing it, it was an organic thing, generating great interwoven trees in the computer memory and in my head that were many-layered and that were modified and traversed, and impacted on a dynamic multi-versioned data store alongside many other threads, causing and needing deep psychological flow. The code comments are released as-is, and are often streams-of-consciousness.
A number of other people have given you some good suggestions and to those I'd add that you might find it worthwhile looking for an early version of PostgreSQL, i.e. v6 or older, which basically started off as a teaching/research exercise so at least in those days was well documented.
Look, I'm sorry to be brutal but software is /complex/, and the more man-years have gone into a project the more complex it's likely to be. Alternatively, if a project was left on a hillside at birth it's likely to be valueless, and a waste of time in terms of both utility and didactic potential.
If you think that, as somebody with admittedly-limited experience, your chances of getting to grips with a project are dominated by your familiarity with the language it's written in then you're fooling nobody but yourself: these days you /need/ at least limited familiarity with C/C++ (and, regrettably, with Python and Javascript) even if you have no intention of writing anything in them.
MarkMLl
-
I mean to learn client-server database principles.How to make a client-server database.
Learn the various bits. For a networked SQL database, some key pieces:
- how to organize data on disk using B-trees etc
- how to parse SQL
- how to execute the parsed SQL to work with the stored data
- backup and restore
- authentication and authorization
- network programming
- data encryption over the wire
- data encryption at rest
- SDK for database client programming
Anything important missing from my list I'm sure others will add.
-
I have found these
https://github.com/ggaughan/ThinkSQL
https://sourceforge.net/projects/tpflashfiler/
Have you actually read the description that goes with ThinkSQL?
The source code is linear per se, but while writing it, it was an organic thing, generating great interwoven trees in the computer memory and in my head that were many-layered and that were modified and traversed, and impacted on a dynamic multi-versioned data store alongside many other threads, causing and needing deep psychological flow. The code comments are released as-is, and are often streams-of-consciousness.
A number of other people have given you some good suggestions and to those I'd add that you might find it worthwhile looking for an early version of PostgreSQL, i.e. v6 or older, which basically started off as a teaching/research exercise so at least in those days was well documented.
Look, I'm sorry to be brutal but software is /complex/, and the more man-years have gone into a project the more complex it's likely to be. Alternatively, if a project was left on a hillside at birth it's likely to be valueless, and a waste of time in terms of both utility and didactic potential.
If you think that, as somebody with admittedly-limited experience, your chances of getting to grips with a project are dominated by your familiarity with the language it's written in then you're fooling nobody but yourself: these days you /need/ at least limited familiarity with C/C++ (and, regrettably, with Python and Javascript) even if you have no intention of writing anything in them.
MarkMLl
Thank you,MarkMLI.I understand your idea。
-
I mean to learn client-server database principles.How to make a client-server database.
Learn the various bits. For a networked SQL database, some key pieces:
- how to organize data on disk using B-trees etc
- how to parse SQL
- how to execute the parsed SQL to work with the stored data
- backup and restore
- authentication and authorization
- network programming
- data encryption over the wire
- data encryption at rest
- SDK for database client programming
Anything important missing from my list I'm sure others will add.
Thanks,PierceNg
I want to record these in my notebook.
-
- how to organize data on disk using B-trees etc
See https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/ (https://benjamincongdon.me/blog/2021/08/17/B-Trees-More-Than-I-Thought-Id-Want-to-Know/)
I dunno if there are "standalone" open source B-tree implementations in Pascal. It'll be nice to have one.
-
I dunno if there are "standalone" open source B-tree implementations in Pascal. It'll be nice to have one.
There are several, probably, but one that comes to mind at the moment is TurboPower B-Tree Filer (https://sourceforge.net/projects/tpbtreefiler/).
Though it's kind of oldish and I don't remember if it's fully compatible with Free Pascal; probably needs to be compiled in mode TP or Delphi and thoroughly tested before using it in production code.
-
Though it's kind of oldish and I don't remember if it's fully compatible with Free Pascal; probably needs to be compiled in mode TP or Delphi and thoroughly tested before using it in production code.
Also while it provides an OKish API for file access, it's very much not suitable for running on a network where multiple people might attempt (WILL EVENTUALLY ATTEMPT) simultaneous access, and omits the higher-level operations that people with some degree of SQL exposure expect. I'm not necessarily criticising it for not supporting SQL since the OP didn't make clear whether this was one of his requirements, but these days things like transactions/rollback are pretty much de rigeur.
MarkMLl
-
TDBF is also still built in.
-
I dunno if there are "standalone" open source B-tree implementations in Pascal. It'll be nice to have one.
There are several, probably, but one that comes to mind at the moment is TurboPower B-Tree Filer (https://sourceforge.net/projects/tpbtreefiler/).
Though it's kind of oldish and I don't remember if it's fully compatible with Free Pascal; probably needs to be compiled in mode TP or Delphi and thoroughly tested before using it in production code.
So I booted into Windows and opened the project using Delphi CE 10.3. Worked through incompatibility between PAnsiChar and PWideChar, and some function signature changes. After that got compilation error like "Cannot access element 0. use SetLength." Gave up at that point. Don't feel up to attempting to port this to Free Pascal.
Like the OP who started this thread, I'm more looking at this for learning. If I'm building an app with local database I will just use SQLite.
-
TDBF is also still built in.
Thanks. And dBase file format is well documented so that helps while reading the code.
-
After that got compilation error like "Cannot access element 0. use SetLength." Gave up at that point. Don't feel up to attempting to port this to Free Pascal.
That's a very easy one to fix: the compiler's telling you that the code's trying to do something like a[0] := Length(b) which is only valid for shortstrings, replace it with SetLength(a, Length(b)).
MarkMLl
-
Where is the open source small network database? I want to learn the principle.
Thanks.
Firebird would be your best option:
http://firebirdsql.org/en/firebird-rdbms/
Thank you.
Firebird is very good.But it is large,and I don't know how to C++.I am a newbie.
Firebird SQL is not at all a large footprint. It installs very quickly and requires very little, if any, configuration. It is also a zero admin required system, except for backups and restores. There are also native pathways to access it using Lazarus. I am the author of one of them. You can use IB Objects (www.ibobjects.com) to work with it directly. If anyone wants to give IBO a try, reach out to me directly and I can set you up with a read-only tap on my SVN repository for development.
I would also like to put in a plug for people to support the Firebird Foundation.
https://www.firebirdsql.org/en/firebird-foundation/
Thanks,
Jason Wharton
Firebird Foundation President