pointed out above the two things "using a db" and "make the system self contained" are not mutually exclusive. SQLite is self-contained in DBD::SQLite
and doesn't require any extra installs though it does need to be compiled for the platform of choice. DBD::AnyData
and its prereqs are pure-perl so don't require either compliation or installation of a separate db server. Both of those would allow you to distribute a self-contained, working package but also allow the user to opt to connect it to a separate standalone db server if desired.