Basic4ppc legacy exes are difficult to decompile as they are tokenised to a proprietary format and interpreted by a bundled execution engine.
Basic4ppc optimised compiled exes are standard .NET assemblies containing IL (intermediate language) which is JITted (just in time compiled) by the .NET Framework to native code when run. The format of the IL is more or less independent of the language used to originally compile it so a C# original can be decompiled to VB.Net or Delphi for example, and vice versa.
The most famous (and free) decompiler is .NET Reflector
.NET Reflector, class browser, analyzer and decompiler for .NET which is a very useful tool. Microsoft has left the whole .NET Framework open so that you can use Reflector to explore all the Framework assemblies and see how things work. There is at least one plugin to Reflector that can produce VS2005 Solutions that with a bit of tidying can be modified and recompiled - I have actually done this on a couple of occasions where the source code was not available.
There are several obfuscators, free and commercial, that you can use to remove unneeded information from your exes and mangle and encrypt variables names and strings to make things more difficult to reverse engineer. These are of varying quality in terms of their success in resistance to decompilation and commercial is not necessarily best. Google for "obfuscator" to find out more.
However I don't understand how "how can you for example have database security?" relates to this issue.

A database file is language agnostic so, for example, a SQLite database file can be read by any program that can use SQLite data files whether .NET or native code.