Skip to content

The project is a menu-driven application for student courses database where the user is able to perform operations like adding a course, searching for a courses or deleting a course, etc.

Notifications You must be signed in to change notification settings

catherinewinslet/Student-course-library-using-Btree-File-structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

A study on B tree file stucture

The project is a menu-driven application for student courses database where the user is able to perform operations like adding a course, searching for a courses or deleting a course, etc.

Brief about File Structures

A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks. File Structure is a way of organizing files in such a way that inserting and retrieving of record is done efficiently.

Accessing records from file

There are different mechanisms for accessing records from files. Indexed-sequential access is a mechanism where an index is created for each file which contains pointers to various blocks. The index is searched sequentially and its pointer is used to access the file directly.

Storing records into file

Among the different techniques of storing the records into the files, variable-length records with delimiters are most efficiently when used along with index-based accessing. The record-delimiter used to seperate records is hash symbol(#) and the seperator for fields in each record is pipeline symbol(|).

Tree File Structures

A tree structure is the most common directory structure. The tree has a root directory, and every file in the system have a unique path. This generalization allows the user to create there own subdirectories and to organize on their files accordingly. Tree structure

BINARY SEARCH TREE

In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.

Problems in BST arises when the node inserting into the tree are always greater/lesser than the root node and child nodes. In this case, we get a skewed tree which is not ideal for accessing and inserting.

SELF- BALANCING BINARY SEARCH TREES

We can solve this problem using self-balancing trees. In computer science, a self-balancing binary search tree is any node-based binary search tree that automatically keeps its height small in the face of arbitrary item insertions and deletions.

B-Tree is a self-balancing search tree. The main idea is to reduce the number of disk accesses. Most of the tree operations like searching, inserting, deleting require O(h) disk accesses where h is the height of the tree. B-tree is a wide rather than a tall tree. The height of B-Trees is kept low by putting maximum possible keys in a B-Tree node. Since the height of the B-tree is low so efficiency of the operations are significantly higher compared to other balanced BST like AVL Tree, Red-Black Tree, ..etc.

Header files used in the program

include<graphics.h> - provides access to a simple graphics library that makes it possible to draw lines, polygons, images, and strings on a graphical window.
include <fstream.h> - input/output stream class to operate on files.
include <conio.h> - declares several useful library functions for performing "console input and output" from a program.
include<iostream.h> - defines the standard input/output stream objects
include <string.h> - set of functions implementing operations on strings in its standard library.
include <stdlib.h> - defines four variable types, several macros, and various functions for performing general functions.
include<dos.h> - contains functions for handling interrupts, producing sound, date and time functions etc.
include<ctype.h> - several functions that are useful for testing and mapping characters.

Flow of Control

flow of control

Screenshots of output

menu add1 add2 display search delete edit1 edit2

File Content

FileContent Index

References

About

The project is a menu-driven application for student courses database where the user is able to perform operations like adding a course, searching for a courses or deleting a course, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages