MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.db.image.DatabaseManagement Class Reference

The DatabaseManagement class is used to create the image database. More...

Public Member Functions

 DatabaseManagement (ConnectInfo ci, string strPath="")
 The DatabaseManagement constructor. More...
 
Exception DatabaseExists (out bool bExists)
 Queries whether or not the database exists. More...
 
Exception PurgeDatabase ()
 The PurgeDatabase function delete the data from the database. More...
 
Exception CreateDatabase (bool bUpdateDatabase=false)
 The CreateDatabae creates a new instance of the database in Microsoft SQL. More...
 
void CreateTemporalTables ()
 Create the temporal tables. More...
 

Protected Member Functions

string GetConnectionString (string strName)
 Returns the connection string used to connect to the database named 'strName'. More...
 
virtual void createTables (SqlConnection connection, bool bFullCreate, bool bUpdateOnly, bool bTemporalOnly=false)
 The createTables function creates the tables of the database. More...
 
virtual void deleteTables (SqlConnection connection)
 The deleteTables function deletes all tables except for the DatasetCreators table. More...
 
string getQueryDatabaseCmd (string strName)
 Returns the query database command. More...
 
string getCreateDatabaseCmd (string strName, string strPath)
 Returns the create database command. More...
 

Protected Attributes

bool m_bUpdateDatabase = true
 Specifies whether or not the database is just being updated or not. More...
 

Properties

ConnectInfo ConnectInfo [get]
 Returns the connection information of the database. More...
 

Detailed Description

The DatabaseManagement class is used to create the image database.

Definition at line 14 of file DatabaseManagement.cs.

Constructor & Destructor Documentation

◆ DatabaseManagement()

MyCaffe.db.image.DatabaseManagement.DatabaseManagement ( ConnectInfo  ci,
string  strPath = "" 
)

The DatabaseManagement constructor.

Parameters
ciSpecifies the connection info (recommended values: db = 'DNN', server = '.')
strPathSpecifies the file path where the database should be created.

Definition at line 29 of file DatabaseManagement.cs.

Member Function Documentation

◆ CreateDatabase()

Exception MyCaffe.db.image.DatabaseManagement.CreateDatabase ( bool  bUpdateDatabase = false)

The CreateDatabae creates a new instance of the database in Microsoft SQL.

Parameters
bUpdateDatabaseSpecifies to update an existing database.
Returns
Returns null on success, an Exception on error.

Definition at line 118 of file DatabaseManagement.cs.

◆ createTables()

virtual void MyCaffe.db.image.DatabaseManagement.createTables ( SqlConnection  connection,
bool  bFullCreate,
bool  bUpdateOnly,
bool  bTemporalOnly = false 
)
protectedvirtual

The createTables function creates the tables of the database.

Parameters
connectionSpecifies the SQL connection.
bFullCreateWhen true the full database is created, otherwise all tables are created except the DatasetCreators table.
bUpdateOnlyWhen true an existing database is being updated.
bTemporalOnlyWhen true only the temporal tables are created.

Definition at line 189 of file DatabaseManagement.cs.

◆ CreateTemporalTables()

void MyCaffe.db.image.DatabaseManagement.CreateTemporalTables ( )

Create the temporal tables.

Definition at line 165 of file DatabaseManagement.cs.

◆ DatabaseExists()

Exception MyCaffe.db.image.DatabaseManagement.DatabaseExists ( out bool  bExists)

Queries whether or not the database exists.

Parameters
bExistsReturns true if the database exists, false otherwise.
Returns
Returns null on success, an Exception on error.

Definition at line 58 of file DatabaseManagement.cs.

◆ deleteTables()

virtual void MyCaffe.db.image.DatabaseManagement.deleteTables ( SqlConnection  connection)
protectedvirtual

The deleteTables function deletes all tables except for the DatasetCreators table.

Parameters
connectionSpecifies the SQL connection.

Definition at line 299 of file DatabaseManagement.cs.

◆ GetConnectionString()

string MyCaffe.db.image.DatabaseManagement.GetConnectionString ( string  strName)
protected

Returns the connection string used to connect to the database named 'strName'.

Parameters
strNameSpecifies the database name of the database to connect to.
Returns
The connection string is returned.

Definition at line 48 of file DatabaseManagement.cs.

◆ getCreateDatabaseCmd()

string MyCaffe.db.image.DatabaseManagement.getCreateDatabaseCmd ( string  strName,
string  strPath 
)
protected

Returns the create database command.

Parameters
strNameSpecifies the database name.
strPathSpecifies the file path where the database is to be created.
Returns
The SQL command is returned.

Definition at line 384 of file DatabaseManagement.cs.

◆ getQueryDatabaseCmd()

string MyCaffe.db.image.DatabaseManagement.getQueryDatabaseCmd ( string  strName)
protected

Returns the query database command.

Parameters
strNameSpecifies the database name.
Returns
The SQL command is returned.

Definition at line 369 of file DatabaseManagement.cs.

◆ PurgeDatabase()

Exception MyCaffe.db.image.DatabaseManagement.PurgeDatabase ( )

The PurgeDatabase function delete the data from the database.

Returns
Returns null on success, an Exception on error.

Definition at line 94 of file DatabaseManagement.cs.

Member Data Documentation

◆ m_bUpdateDatabase

bool MyCaffe.db.image.DatabaseManagement.m_bUpdateDatabase = true
protected

Specifies whether or not the database is just being updated or not.

Definition at line 22 of file DatabaseManagement.cs.

Property Documentation

◆ ConnectInfo

ConnectInfo MyCaffe.db.image.DatabaseManagement.ConnectInfo
get

Returns the connection information of the database.

Definition at line 38 of file DatabaseManagement.cs.


The documentation for this class was generated from the following file: