Low Level Database Access: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
Created page with '{{Navigation for Marauroa Top}} {{Navigation for Marauroa Developers}} {{Database Access}} __TOC__ This article describes how Marauroa accesses the database internally and ho…'
imported>Hendrik Brummermann
No edit summary
Line 7: Line 7:




This article describes how Marauroa accesses the database internally and how you can add support for your own tables. The table structure of the Marauroa database is explained in [[Marauroa Database Structure]]. You might want to have a look at [[High Level Database Access]] which explains the high level API to access the database from your program code.
This article describes how Marauroa accesses the database internally and how you can add support for your own tables. The table structure of the Marauroa database is explained in [[Marauroa Database Structure]]. You might want to have a look at [[High Level Database Access]] first. It explains the high level API to access the database from your program code.


== Database abstraction ==

== Writing your own DAO ==

== Extending a provided DAO ==

== Updating the database structure ==



{{TODO|Clean this up:



=== JDBC Database HOWTO===
{{TODO|Update to reflect DAOs}}
{{TODO|Add H2}}
JDBC technology is an API that lets you access virtually any tabular data source from the Java programming language. It provides cross-DBMS connectivity to a wide range of relational databases. Unfortunatally it does not hide vendor specific stuff. Marauroa and Stendhal currently only work with MySQL because of that. Adding support for other database software would be very easy as the database specific code is concentrated in the classes JDBCDatabase (Marauroa) and StendhalPlayerDatabase (Stendhal). We have no need for that, so it was not done, yet. We will, however, accept patches for multi database system support, so if you need it, go ahead.
JDBC technology is an API that lets you access virtually any tabular data source from the Java programming language. It provides cross-DBMS connectivity to a wide range of relational databases. Unfortunatally it does not hide vendor specific stuff. Marauroa and Stendhal currently only work with MySQL because of that. Adding support for other database software would be very easy as the database specific code is concentrated in the classes JDBCDatabase (Marauroa) and StendhalPlayerDatabase (Stendhal). We have no need for that, so it was not done, yet. We will, however, accept patches for multi database system support, so if you need it, go ahead.


Line 26: Line 37:


The rest of code is handled by the server itself, and it will create the tables if they don't exist.
The rest of code is handled by the server itself, and it will create the tables if they don't exist.
}}