MochaDB is a user-friendly, loving database system that loves to help.
Come on, meet the world's most advanced .NET database system!
- Open source and free for everyone
- Always up to date!
- Serverless
- File based
- High performance
- Lightweight
- Small
- Secure
- Embedded
- RDBMS(Relational Database Management System) features
- Restore unwanted changes with logs
- Embed files into the database with FileSystem
- Full compatible with .NET Core, .NET Standard and .NET Framework
- Script build and debug with MochaScript
- MochaQ for simple and fast querys
- Supports LINQ querys
- Encrypted database file
- Object oriented management support
- MochaDB Studio for databases management with graphical user interface
- Single DLL
- Single database file
- Portable
- Remotely accessible database with a provided server
- Desktop applications
- Web sites/applications
- Mobile applications
- Data storages of servers
- Libraries
- Games
Manage with a powerful management system!
You cannot work with SQL queries, but with MochaQ you can do basic operations with custom commands and work with LINQ queries.
var tables = DB.GetTables();
var result =
from table in tables
where table.Name.StartsWith("A") && table.Columns.Count > 0
select table;
return result;
Of course, when you pull data from the database, you can also query it directly. For this, MochaDB strives to help you, as always!
var tables = DB.GetTables(x=> x.Name.StartsWith("A") && x.Columns.Count > 0);
MochaQ offers quick basic queries. With MochaQuery, you can process and run queries.
MochaDatabase db = new MochaDatabase("path=.\\Databases\\Math.mochadb; AutoConnect=True");
string value = db.Query.GetRun("GETSECTORDATA:PiNumber").ToString();
if(value!="3.14")
db.Query.Run("SETSECTORDATA:PiNumber:3.14");
//Or
MochaDatabase db = new MochaDatabase("path=.\\Databases\\Math.mochadb; AutoConnect=True");
MochaQuery query = new MochaQuery(db);
string value = query.GetRun("GETSECTORDATA:PiNumber").ToString();
if(value!="3.14")
query.Run("SETSECTORDATA:PiNumber:3.14");
MochaScript is a scripting language for MochaDB databases.
It is processed by the debugger and executed with C# code.
It operates independently from the database, but no connection should be open to the targeted database when it is run!
It allows you to work with its own functions and MochaQ commands.
//Author: Mertcan DAVULCU
//Connect.
//Provider "Path" or "Path" "Password"
Provider .\bin\Sources\MyDatabase.mochadb 1230
//Start script commands.
Begin
//Main function.
func Main()
{
String PiNumber = ""
SetPINumber()
String PiNumber2 = PiNumber
Boolean ExistsState = EXISTSSECTOR:PINumber
if ExistsState == True
{
if GETSECTORDATA:PINumber == PiNumber2
{
DELETESECTOR:PINumber
}
}
elif ExistsState == False
{
ADDSECTOR:PINumber:3.14:This is the pi number.
}
else
{
//Classical conditioning. "else" does not work because the elif meets "False" status.
ADDSECTOR:PINumber:3.14:This is the pi number.
}
}
func SetPINumber()
{
PiNumber = "3.14"
//Or.
//delete PiNumber;
//String PiNumber = "3.14"
}
// ******* COMPILER EVENTS *******
compilerevent OnFunctionInvoked()
{
echo "Function called!"
}
//End script commands.
Final
public void Debug(string path) {
MochaScriptDebugger debugger = new MochaScriptDebugger(path);
debugger.DebugRun();
}