2.1.3 DataBaseInit()

The DataBaseInit() function initializes the database system. This involves setting up the database environment and configuring all necessary structures, including tables, indexes and schemas, whether they are newly created or already existing. The main database initialization function includes the following APIs:

  1. ChargerConfigurationDataBaseInit()

    This function initializes the charger configuration database and establishes a connection to it. It also manages any errors that occur during initialization. Specifically, ChargerConfigurationDataBaseInit() sets up the database or data storage system used for managing configuration settings related to EV chargers at a charging station or network. This database includes the standard configuration keys defined in Section 9 of the OCPP v1.6 Specification.

  2. LocalListDataBaseInit()

    The function LocalListDataBaseInit() is designed to initialize the local database or data storage system used to manage and store the "Local Authorization List" in OCPP-based EV charging stations. This list contains data regarding authorized users or vehicles, often identified by RFID card IDs, user credentials, or other means of identification. The function ensures that the local list database is correctly set up and validates the structure where the authorization data will be stored. It also loads any pre-existing authorization data or applies default settings, enabling the charging station to operate independently when an RFID card or similar identification method is presented.

  3. AuthorizationCacheDataBaseInit()

    AuthorizationCacheDataBaseInit() is used to initialize a database or a storage system at an EV charging station, managing cached authorization data. This cache temporarily stores frequently accessed information, such as recently authenticated RFID card IDs, user credentials and session tokens. This mechanism enables local user validation without querying the central server, thereby reducing latency and improving efficiency. The same database will also be utilized when operating in offline scenarios.

    When a user places an RFID card on the reader, the charging station processes the authorization request. The AuthorizationCacheDataBaseInit() method initializes a local cache to store this information. This caching mechanism accelerates the authorization process by storing recent authentication results, which can be reused. This reduces the need for repeated communications with the central system, thereby improving response times and lowering network traffic.