# open\_database

The open\_database function is inside of the [data\_base](https://hrodebert.gitbook.io/qic-database-ver-1.0.0/database/data_base) class, this function opens an EXISTING database and extracts all the tables, its essential to all operations related to editing a database.

Arguments:\
\- std::string file name // the name of the database file

Example

In this example, you first need to follow the installation process. Once completed, you can proceed with this simple demonstration. In this example, we will open and close a database named `mydatabase.db`. Feel free to change the database name, but keep in mind that you need to create the file beforehand.

```cpp
#include "qic.h"
#include <iostream>

int main() {
  data_base db;
  db.open_database("mydatabase.db");
  db.close();
  return 0;
}
```
