View source
From TaskDepender
for
Database
Jump to:
navigation
,
search
''This page describes the TaskDepender™ database.'' == Description == The database holds all the information of the program and the project. It offers an interface to the user that is independent from the actual database engine used. The purpose of the database is to shield the actual ''implementation'' of the database from the user. This means that the user knows that there is a database that holds the tables with the given columns but does not have to know how these are stored in tables and sub-tables and how the consistency is maintained. == Design == The following tables are defined: {| valign="top" border="1" cellpadding="3" cellspacing="0" |- style="color:white; background-color:#000000;" | | '''Name''' || '''Contents''' |- valign="top" | [[Tasks database table|<tt>Tasks</tt>]] || All the tasks in the project. |- valign="top" | [[Deliverables database table|<tt>Deliverables</tt>]] || All the deliverables in the project. |- valign="top" | [[Connections database table|<tt>Connections</tt>]] || All the connections between tasks and deliverables. |- valign="top" | [[Resources database table|<tt>Resources</tt>]] || All the (human) resources of the project. |} In addition to these tables there are the following temporary tables: {| valign="top" border="1" cellpadding="3" cellspacing="0" |- style="color:white; background-color:#000000;" | | '''Name''' || '''Contents''' |- valign="top" | [[Task list database table|<tt>TaskList</tt>]] || All the tasks in the current diagram. |- valign="top" |[[Deliverable list database table|<tt>DeliverableList</tt>]] || All the deliverables in the current diagram. |- valign="top" | [[Connection list database table|<tt>ConnectionList</tt>]] || All the connections in the current diagram. |- valign="top" | [[Selected tasks database table|<tt>SelectedTasks</tt>]] || The ids of the selected tasks in the current diagram. |- valign="top" | [[Selected deliverables database table|<tt>SelectedDeliverables</tt>]] || The ids of the selected deliverables in the current diagram. |- valign="top" | [[State variables|<tt>StateVariables</tt>]] || The variables of the state of the program. |} === Database interface === The interface for the user is implemented in a list of functions. The list is given on [[Database interface|"TaskDepender Database interface"]]. The statements used in these database functions are stored as string constants and listed on [[Database statements|"TaskDepender database statements"]]. [[Database error codes]] === Clipboard === [[Virtual clipboard]] == Implementation == === Database engine === The TaskDepender™ database is implemented in the file <tt>td_database.c</tt> using [http://www.sqlite.org SQLite]. This is done by adding the [http://www.sqlite.org/amalgamation.html amalgamation] <tt>sqlite3.c</tt> source-file to the project and including the <tt>sqlite3.h</tt> header-file. The database is designed to take care of maintaining the consistency which is taken into account when designing the tables by defining the constraints. All functions return an integer value which indicates if an error occurred. A generic callback function is to be supplied by the user. int db_callback(void* data, int numcols, char** values, char** headers) When the exiting the call-back function, the memory is cleared again. rc = sqlite3_exec(db, <SqlStatement>, db_callback, <relayed to the 1st argument of the callback>, &dbError ); http://www.sqlabs.com/blog/ ---- * [[Main]]
Return to
Database
.
Views
Page
Discussion
View source
History
Personal tools
Log in
Navigation
Main page
Recent changes
Help
Search
Toolbox
What links here
Related changes
Special pages