Skip to content

MonicaSaeed/File-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File-Management

📒This is a our assignments for File Management and processing using C++ programming language

First assignment:

Want to store data about Employees and Department. (for simplicity consider any employee belongs to only one department, but any department may have more than one employee). Save the data for employees and department in the following format: delimited fields, length indicator records. You should write the producers that build the following indexes:
1. Primary index using the Employee_ID (for Employees datafile)
2. Primary index using the Dept_ID (for Department datafile)
3. Secondary index using Dept_ID (for Employee datafile) //Dept _ID is sec. key in Employees datafile
4. Secondary index using Dept_Name (for Department datafile)

The user can write a query that contains fixed key words

Some test cases:

image
Test case to show adding a new employee on the right after adding the employee's first 10 characters are the file header, there are 3 characters after the header that are the length indicator record, after that there are employee's data.

image
Test case to show search using primary index and binary search.

image
Test case to delete employee using linked list.

image
Test case to show search after delete.

image
Test case to show adding a new department.

image
Query writing test.

Second assignment:

Program that create, store and manipulate a set of n fixed-length records as B-tree index on a binary file. Each record consists of m descendants (m records IDs and m references to the actual records on a data file) + 1 integer to indicate leaf/no leaf status (The first integer of each node, 0→ means a leaf node, 1 → a non-leaf node).

image
The file at creation time (if number of records = 10 and m= 5).

image
The index file after inserting.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages