In this project, you will design a storage manager system. To do so, you will design a system catalogue to store the metadata as well as data storage units; pages and records.
Your design must support following operations:
- Create a type
- Delete a type
- List all types
- Create a record
- Delete a record
- Search for a record (by primary key)
- List all records of a type
During the design process, you will have to make certain decisions and assumptions. The decisions include, but are not limited to:
- Page size (Something between 1KB and 2KBs is optimal)
- File size
- What information to store in your page headers and record headers
- Max number of fields a type can have
- Max length of a type name
- Max length of a field name
For the assumptions, you can assume that user always enters valid input and fields are always integers, though field and type names can be alphanumeric. Moreover, a disk manager already exists that is able to fetch the necessary pages when addressed. You can make further assumptions, as long as they do not conflict with the base constraints and you explained them in your report clearly. Constraints:
- Your data must be organized in pages and pages must contain records. So, you must clearly explain your page and record structure in your report.
- You are not allowed to store all pages in the same file and a file must contain multiple pages. This means that your system must be able to create new files as storage manager grows. Moreover, when a file becomes free due to deletions, that file must be deleted.
- Though a file contains multiple pages, your system must not load the whole file to RAM when it is needed. Instead, it must read a file page by page.
All in all, you will propose a storage manager that obeys the abovementioned rules under certain assumptions and write a report explaining it in detail.