What is the MiniDB Engine?

MiniDB is a simple, easy to understand, and easy to modify open source database engine.  It has been designed as a pedagogical tool for teaching and learning database internals or advanced database concepts.

Tags

 Database, database engine, database internals, file organization, system software development

OS

Windows

Language

C++

License

GNU Public License

Distribution Site

http://www.cs.iusb.edu/minidb/

 

MiniDB Logical Architecture

 

MiniDB Classes


 

How can I use MiniDB in the courses I teach?

Anyone who has access to the internet can use the MiniDB resources provided on this site (assignments, class specification, papers, images, etc.)  However, computer science and informatics faculty teaching information retrieval, database internals, or advance database concepts can make a formal email request to obtain the source code associated with the project.  The C++ source is provided with GNU Public License; however its distribution is restricted, to provide individual faculty ultimate control over what code should or should not be given to their students as they work on their own version of MiniDB project.  Contact the author to request the MiniDB Source Code (hhakimza@iusb.edu).

Faculty can use MiniDB in a number of ways, among which are:

1)    Faculty teaching a course in Database Internals can use the MiniDB assignments to systematically guide their students to build the MiniDB Foundation Classes (MFC) for a simple database engine (See suggested assignments).  The process of building the foundation classes can be split into 3 to 5 assignments and can take from 6 to 10 weeks to implement.  During this time, students can build all the necessary classes to implement a relational-algebra based database engine.  This still leaves the remainder of the semester for the coverage of other topics and extending or optimizing the engine.  For example, students can extend the MiniDB engine to accommodate features such as:

a)    Hash index

b)    Cluster indexes

c)    XML

d)    Hash join

e)    SQL syntax parser

f)     Foreign key constraint

g)    B-tree

 

2)    Faculty teaching advanced database concepts can start by quickly familiarizing their students with the MiniDB Foundation Classes by way of an assignment (that uses the MFC to build a simple database and then queries the database using the relational algebra API). Later class discussion can switch toward advanced concepts such as transaction management, query processing and optimization, concurrency control, security, distributed query processing, etc, and future assignment can be assigned that directs the student to extend MiniDB by implementing the above concepts (and their related algorithms).  For example, students can extend the MiniDB engine to incorporate features such as:

a)    2PL Concurrency control  versus Optimistic  (then benchmark and compare the two algorithms)

b)    Implement a new networking class, and extend the MiniDB engine to accommodate distributed query processing

c)    Implement a new SQL query processing class which accepts an SQL statement as input and develops a query plan for execution (converting the SQL statement to a series of relational algebra operations)

d)    Implement a new query optimization module which takes meta-data as well as runtime information and optimizes the query tree.

e)    Develop new research ideas or algorithms, implement the algorithm in MiniDB, and then compare it against existing algorithms.

 

What is included in MiniDB?

MiniDB project provides the following components:

1)    A series of suggested assignments

2)    Papers and technical reports documenting the system

3)    Design diagrams, slides, etc.

4)    Class specification / API for various classes (Seq_IO, Random_IO, Data_File, Index_File, Meta_File, Table, Rel_Alg)

5)    Source Code (restricted distribution)

 

Seq_IO.h

Seq_IO.cpp

Source for Sequential _IO Class

Random_IO.h

Random_IO.cpp

Source for Random_IO class

Index_File.h

Index_File.cpp

Source for creating Index files  class

Data_File.h

Data_File.cpp

Source for a simple data-file implementation

Meta_File.h

Meta_File.cpp

Source for a simple meta-file implementation

Table.h

Table.cpp

Source for a simple table implementation, allowing for creation and manipulation of a relational table.  This class integrates three objects (meta_file, data_file, index_file) in order to implement a simple relational table.

main.cpp

 

department.dta           

department.idx

department.mta

Test file for testing the above classes

 

Data, index and meta files created after running the main.cpp program.

GPL.COPYING.txt

GNU Public License agreement

 

6)    External contributions  (useful assignments, code, etc, provided by the MiniDB user community)

Can I distribute the MiniDB source code to my students?

Yes.  However the source should not be distributed or placed on the internet, such that it can be publically viewed or it can be found by popular search engines.  Most faculty will choose to distribute the source via their campus course management system.  If such a system is not available, then it should be distributed via removable media.  The students must also be instructed by their faculty not to place the source on a publically accessible internet site.

 

How can I get some help?

For the most part, MiniDB is fairly documented and simple to understand.  If you have a question and I can answer it in less than 10 lines of email.  I will attempt to answer it.  Send your questions to hhakimza@iusb.edu

 

 

How do I report bugs, submit bug fixes, code refinements, ideas for assignments, etc?

Send you bug reports, bug fixes and other code or assignment contributions to hhakimza@iusb.edu.  I’ll make sure they are reviewed, and your contributions are noted on the web site.