On 19.03.2024 at 21:35, Yordan Yanakiev wrote:
> So far thank you fellows for the help. I really appreciate it.
> Tomasz Tyrakowski - I am still failing to understand this part of "
> embedded mode". Can You describe how It can be done ?
> ( At this point this start to sound important to me, and I am not sure I
> have seen such usage this far )
In short, instead of connecting to "localhost:/path/database.fdb" and
talking to the Firebird server process, you attach using just
"/path/database.fdb" and your Firebird client library (together with
some other supporting libraries, depending on the version) opens the
database file directly, creating a "private" server inside your client
application process - something similar to how SQLite works (but while
SQLite works only this way, in Firebird it's just one of the modes of
operation). In this mode all user/password/role authentication is
bypassed and you act as a dabase owner with full privileges (but it
requires physical access to the fdb file, that's why in a real
client-server scenario the actual database file is separated from client
applications).
See also here:
https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/ufb/using-firebird.html#ufb-cs-embedded
because I might not be clear enough. Or just try it yourself: in
embedded mode you can attach to any database you've got access to on the
file system level, without providing any auth data (user/password/role).
IMHO, if you give away the database file together with your application,
you'd better focus on employing some kind of encryption instead of
relying on security by obscurity (however smart that obscurity might
seem). Of course it all depends on how important the data is, and what
harm can be done by circumventing your application and accessing the
data directly (and also who might actually want to make the effort to do
that).
regards
Tomasz