You are on page 1of 9

МІНІСТЕРСТВО ОСВІТИ ТА НАУКИ УКРАЇНИ

НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ “ЛЬВІВСЬКА ПОЛІТЕХНІКА”

Кафедра САПР

ПРЯМИЙ МЕТОД ДОСТУПУ ДО ФАЙЛІВ НА ЗОВНІШНІХ


ЗАПАМ’ЯТОВУЮЧИЙ ПРИСТРОЯХ

ЗВІТ
до лабораторної роботи № 2 з курсу:
“ Організація баз даних і знань ”

Виконав:
студент групи КН-24
Дикий Н. В.
Прийняв:
Головацький Р. І.

ЛЬВІВ 2016
1. ТЕМА

Прямий метод доступу до файлів на зовнішніх запам’ятовуючих


пристроях.

2. МЕТА РОБОТИ

Розглянути органiзацiю i ведення файлiв прямого доступу; набути


практичнi навички у програмуваннi алгоритмiв доступу хешуванням.

3. ЛАБОРАТОРНЕ ЗАВДАННЯ

Написати програму для підтримки прямого методу доступу до файлів, яка


реалiзує такi функцiї:
1. Створення файлу бази даних.
2. Друк бази даних.
3. Читання запису за введеним ключем.
4. Пошук запису за введеним ключем (не менше 3х полів).
5. Видалення запису за введеним ключем.
6. Вставлення запису.
7. Модифiкацiя запису.
8. Захист від переповнень (методом зв’язаних записів).

Тема бази даних: «Веломагазин»

4. ТЕОРЕТИЧНІ ВІДОМОСТІ

Головною особливiстю прямого методу доступу є взаємна однозначна


вiдповiднiсть мiж ключем запису i його фiзичною адресою. Фiзичне
розмiщення запису визначається безпосередньо iз значення ключа.
Створивши файл прямого доступу i видiливши для нього необхiдну дiлянку
пам’ятi, можна вставляти записи у будь-якi мiсця файла. Перевага такого
пiдходу над послiдовною органiзацiєю файла полягає у тому, що вдається
отримати запис за заданим значенням ключа без попереднього перегляду всiх
попереднiх записiв файла.
ЕФЕКТИВНІСТЬ ДОСТУПУ дорiвнює одиницi.
ЕФЕКТИВНІСТЬ ЗБЕРІГАННЯ залежить вiд густини ключiв. Якщо густина
низька, пам’ять використовується неефективно, оскiльки резервуються адреси,
що вiдповiдають вiдсутнiм ключам. У цьому випадку доцiльно
використовувати для органiзацiї файла метод хешування. Пряму адресацiю
можна важати частковим випадком методу хешування.
На практицi кiлькiсть можливих значень ключiв набагато перевищує
кiлькiсть реально присутнiх у будь-який момент значень цього ключа. У цьому
випадку пряма адресацiя є невигiдною, оскiльки надто багато пам’ятi
резервується для записiв, яких немає i нiколи не буде у файлi. Метод хешування
дає змогу уникнути цього i водночас зберегти ефективнiсть, властиву прямiй
адресацiї.
На основi iнформацiї про множину фактичних значень ключiв створюється
файл прямого доступу з такою кiлькiстю записiв, яка дещо перевищує фактичне
значення ключiв. Вибирається функцiя хешування, яка перетворює значення
ключа кожного запису в адресу блока у файлi. Зрозумiло, що хеш-функцiя h -
це функцiя, яка вiдображає принцип "багато в один".
5. КОД ПРОГРАМИ
#include "cmanagerdatabase.h" cin>>Type; cout << "Enter element`s ID to
cout<<endl; delete him!!! ";
//------------------------------------------------- cin >> id;
-------- cout<<"Enter Color: "; cout << endl;
cin>>Color; if (db->FindID(id) == -1)
CManagerDatabase::CManagerDatabase() cout<<endl; {
{
cout<<"Enter TypeOfFrame: ";
Information.push_back("Delete
} cin>>TypeOfFrame;
item is not success!!!");
void CManagerDatabase::sort(CDatabase cout<<endl;
}
*db)
else
{ cout<<"Enter Weight: ";
{
bool wasSwapped = true; cin>>Weight;
db->Delete(db-
for (int i = 1; (i <= db- cout<<endl;
>FindID(id));
>Base.size()) && wasSwapped; ++i)
{ cout<<"Enter WheelDiameter: ";
wasSwapped = cin>>WheelDiameter; Information.push_back("Delete
false; cout<<endl; item is success!!!");
for (int j = 0; j < }
(db->Base.size() - i); ++j) cout<<"Enter Price: "; }
{ cin>>Price;
if (db- cout<<endl; void CManagerDatabase::Edit(CDatabase
>Base[j].getID() > db->Base[j+1].getID()) *db)
{ cout<<"Enter Guarantee: "; {
cin>>Guarantee; string Mark;
cout<<endl; string Model;
CBicycle tmp = db->Base[j];
string Type;
cout<<"Enter Gears: "; string Color;
db->Base[j] = db->Base[j + 1]; cin>>Gears; string TypeOfFrame;
cout<<endl; float Weight;
int WheelDiameter;
db->Base[j + 1] = tmp;
cout<<"Enter ID: "; float Price;
cin>>ID; int Guarantee;
wasSwapped = true; cout<<endl; int Gears;
} int ID;
} if (db-
} >FindID(ID) != -1) cout << "Enter element`s id to
} { edit him: ";
cin >> ID;
void cout << endl;
Information.push_back("Add
CManagerDatabase::ADD(CDatabase
new item is not success!!!");
*db)
} cout << "Enter Mark: ";
{
else cin >> Mark;
string Mark;
{ cout << endl;
string Model;
CBicycle
string Type;
bicycle(Mark,Model,Type,Color,TypeOfF cout << "Enter Model: ";
string Color;
rame,Weight,WheelDiameter,Price,Guara cin >> Model;
string TypeOfFrame;
ntee,Gears, ID); cout << endl;
float Weight;
db-
int WheelDiameter;
>Base.push_back(bicycle); cout << "Enter Type: ";
float Price;
cin >> Type;
int Guarantee;
cout << endl;
int Gears; Information.push_back("Add
int ID; new item is success!!!");
cout << "Enter Color: ";
}
cin >> Color;
cout<<"Enter Mark: ";
cout << endl;
cin>>Mark; }
cout<<endl;
cout << "Enter TypeOfFrame:
void
";
cout<<"Enter Model: "; CManagerDatabase::DELETE(CDatabase
cin >> TypeOfFrame;
cin>>Model; *db)
cout << endl;
cout<<endl; {
int id;
cout << "Enter Weight: ";
cout<<"Enter Type: ";
cin >> Weight;
cout << endl; cout << <<
"============================= "Model: " << db->Base[index].getModel()
cout << "Enter =========" << endl; << "\n"
WheelDiameter: "; cout << "ID: " << <<
cin >> WheelDiameter; db->Base[index].getID() << "\n" "Type: " << db->Base[index].getType()
cout << endl; << << "\n"
"Mark: " << db->Base[index].getMark() <<
cout << "Enter Price: "; << "\n" "Color: " << db->Base[index].getColor()
cin >> Price; << << "\n"
cout << endl; "Model: " << db->Base[index].getModel() << "Type
<< "\n" Of Frame: " << db-
cout << "Enter Guarantee: "; << >Base[index].getTypeOfFrame() << "\n"
cin >> Guarantee; "Type: " << db->Base[index].getType() <<
cout << endl; << "\n" "Weight: " << db-
<< >Base[index].getWeight() << "\n"
cout << "Enter Gears: "; "Color: " << db->Base[index].getColor() <<
cin >> Gears; << "\n" "Wheel Diameter: " << db-
cout << endl; << "Type >Base[index].getWheelDiameter() << "\n"
Of Frame: " << db- <<
if (db->FindID(ID) == -1) >Base[index].getTypeOfFrame() << "\n" "Price: " << db->Base[index].getPrice()
{ << << "\n"
"Weight: " << db- <<
>Base[index].getWeight() << "\n" "Guarantee: " << db-
Information.push_back("Edit
<< >Base[index].getGuarantee() << "\n"
item is not success!!!");
"Wheel Diameter: " << db- <<
}
>Base[index].getWheelDiameter() << "\n" "Gears: " << db->Base[index].getGears()
else
<< << endl;
{
"Price: " << db->Base[index].getPrice() cout <<
int index = (db-
<< "\n" "=============================
>FindID(ID));
<< =========" << endl;
db-
"Guarantee: " << db-
>Base[index].setColor(Color);
>Base[index].getGuarantee() << "\n"
db-
<<
>Base[index].setGears(Gears); Information.push_back("Find
"Gears: " << db->Base[index].getGears()
db- item is success (field)!!!");
<< endl;
>Base[index].setGuarantee(Guarantee); }
cout <<
db-
"=============================
>Base[index].setMark(Mark);
=========" << endl;
db- }
>Base[index].setModel(Model);
db- Information.push_back("Find void
>Base[index].setPrice(Price); item is success!!!"); CManagerDatabase::Print(CDatabase*
db- } db)
>Base[index].setType(Type); } {
db- for (int i = 0; i < db-
>Base[index].setTypeOfFrame(TypeOfFr void >Base.size(); i++)
ame); CManagerDatabase::FINDFIELD(CDatab {
db- ase *db) cout <<
>Base[index].setWeight(Weight); { "=============================
db- string Parameter; =========" << endl;
>Base[index].setWheelDiameter(WheelDi string field; cout << "ID: " <<
ameter); cout << "Enter field to search: db->Base[i].getID() << "\n"
"; <<
cin >> field; "Mark: " << db->Base[i].getMark() << "\
Information.push_back("Edit
cout << endl; n"
item is success!!!");
<<
}
cout << "Enter Parameter to "Model: " << db->Base[i].getModel() <<
search: "; "\n"
}
cin >> Parameter; <<
cout << endl; "Type: " << db->Base[i].getType() << "\
void
n"
CManagerDatabase::FINDID(CDatabase
if (db- <<
*db)
>FindField(field,Parameter) == -1) "Color: " << db->Base[i].getColor() << "\
{
{ n"
int ID;
<< "Type
cout << "Enter element`s ID to
Of Frame: " << db-
find him: "; Information.push_back("Find
>Base[i].getTypeOfFrame() << "\n"
cin >> ID; item is not success (field)!!!");
<<
cout << endl; }
"Weight: " << db->Base[i].getWeight()
else
<< "\n"
if (db->FindID(ID) == -1) {
<<
{ int index = db-
"Wheel Diameter: " << db-
>FindField(field, Parameter);
>Base[i].getWheelDiameter() << "\n"
cout <<
Information.push_back("Find <<
"=============================
item is not success!!!"); "Price: " << db->Base[i].getPrice() << "\
=========" << endl;
} n"
cout << "ID: " <<
else <<
db->Base[index].getID() << "\n"
{ "Guarantee: " << db-
<<
int index = db- >Base[i].getGuarantee() << "\n"
"Mark: " << db->Base[index].getMark()
>FindID(ID); <<
<< "\n"
"Gears: " << db->Base[i].getGears() <<
endl;
cout << } float getWeight();
"============================= }
=========" << endl; void setWheelDiameter(int
} void WheelDeameter);
} CManagerDatabase::Read(CDatabase* int getWheelDiameter();
db)
void { void setPrice(float Price);
CManagerDatabase::Save(CDatabase* vector<CBlock> float getPrice();
db) BlockManager;
{ int p = 0; void setGuarantee(int Guarantee);
while (FileExist(to_string(p) + int getGuarantee();
for (int i = 0; i < ".txt"))
Information.size(); i++) { void setGears(int Gears);
{ CBlock int getGears();
cout << block(to_string(p));
Information[i] << endl; void setID(int ID);
} int getID();
BlockManager.push_back(block);
vector<CBlock> void setBlockNumber(int
p++;
BlockManager; BlockNumber);
}
int tmp = 10; int getBlockNumber();
for (int i = 0; i < 11; i++)
for (int i = 0; i <
{ private:
BlockManager.size(); i++)
string str = string m_sMark;
{
to_string(i); string m_sModel;
CBlock block(str); string m_sType;
string m_sColor;
BlockManager[i].ReadFromFile(); string m_sTypeOfFrame;
} float m_fWeight;
BlockManager.push_back(block);
int m_iWheelDiameter;
}
for (int i = 0; i < float m_fPrice;
BlockManager.size(); i++) int m_iGuarantee;
for (int i = 0; i < db-
for (int j = 0; j < int m_iGears;
>Base.size(); i++)
BlockManager[i].block.size(); j++) int m_iID;
{
{ int m_iBlockNumber;
if
db- };
(BlockManager[db-
>Base.push_back(BlockManager[i].block[
>Base[i].getBlockNumber()].getSize()>=1
j]);
0)
} #include "cmanagerdatabase.h"
{
}
if
int main(int argc, char *argv[])
(BlockManager[BlockManager.size() -
//------------------------ {
1].getSize() >=10)
CDatabase Database;
{
#include "vector" CManagerDatabase
#include <string> ManagerDB;
#include <iostream>
CBlock #include <fstream>
block(to_string(BlockManager.size())); #include <io.h>
string ch;
using namespace std;
while (true)
class CBicycle
BlockManager.push_back(block); {
{
system("cls");
public:
cout << "1) Load
CBicycle();
Base" << endl;
BlockManager[BlockManager.size() - CBicycle(string Mark, string Model,
cout << "2) New
1].block.push_back(db->Base[i]); string Type, string Color,
Base" << endl;
} string TypeOfFrame, float
cout << "3) Exit"
else Weight,
<< endl;
{ int WheelDiameter, float Price,
int Guarantee, int Gears,
cin>>ch;
int ID);
BlockManager[BlockManager.size() - if (ch == "1")
CBicycle(const CBicycle &bcl);
1].block.push_back(db->Base[i]); {
~CBicycle();
}
}
void setMark(string Mark); ManagerDB.Read(&Database);
else
string getMark();
{
ManagerDB.sort(&Database);
void setModel(string Model);
while
BlockManager[db- string getModel();
(true)
>Base[i].getBlockNumber()].block.push_
{
back(db->Base[i]); void setType(string Type);
} string getType();
}
void setColor(string Color); system("cls");
for (int i = 0; i < string getColor();
BlockManager.size(); i++)
cout << "1) Print" << endl;
{ void setTypeOfFrame(string
TypeOfFrame);
string getTypeOfFrame(); cout << "2) Delete" << endl;
BlockManager[i].WriteToFile();
void setWeight(float Weight);
}
}
cout << "3) Edit" << endl; }
if (ch == "2")
{
cout << "4) FindId" << endl; if (ch == "5")
}
if (ch == "3")
cout << "5) FindField" << {
{
endl;
break;
system("cls"); }
cout << "6) Save" << endl;
}
cout << "7) Add" << endl;
ManagerDB.FINDFIELD(&Database); system("pause");
return 0;
cout << "8) Exit" << endl;
}
system("pause");
#include "cdatabase.h"
cin >> ch;
} class CBlock
{
if (ch == "1")
public:
if (ch == "6")
vector<CBicycle> block;
{ CBlock(string _Number);
{ CBlock(const CBlock &bl);
void WriteToFile();
system("cls");
void ReadFromFile();
system("cls");
int getSize();
string Number;
ManagerDB.Print(&Database); string adress;
ManagerDB.Save(&Database); };
system("pause");
#include "cbicycle.h"
system("pause");
} class CManagerDatabase;
}
class CDatabase
if (ch == "2")
{
if (ch == "7")
public:
{
{ CDatabase();
void Add(string Mark, string Model,
system("cls");
string Type, string Color,
system("cls");
string TypeOfFrame, float
Weight,
int WheelDiameter, float Price,
ManagerDB.DELETE(&Database); int Guarantee, int Gears,
ManagerDB.ADD(&Database); int ID);
void Delete(int Index);
system("pause");
void LoadBase(string Way);
int FindID(int ID); //повертає
ManagerDB.sort(&Database);
} позицію або -1 якщо не існує
int FindField(string Field, string
system("pause"); Param); //
if (ch == "3")
void Edit(int ID,string Mark, string
Model,
}
{ string Type, string Color,
string TypeOfFrame, float
if (ch == "8") Weight,
system("cls");
int WheelDiameter, float Price,
int Guarantee, int Gears);
{
ManagerDB.Edit(&Database);
system("cls"); private:
vector<CBicycle> Base;
system("pause");
friend CManagerDatabase;
};
ManagerDB.Save(&Database);
}

system("pause"); #include "CBlock.h"


if (ch == "4")

break;
{
class CManagerDatabase
} {
system("cls");
} public:
if (ch == CManagerDatabase();
"1") void sort(CDatabase *db);
{ void ADD(CDatabase *db);
ManagerDB.FINDID(&Database); void DELETE(CDatabase
*db);
void Edit(CDatabase *db);
system("pause"); ManagerDB.ADD(&Database);
void FINDID(CDatabase *db);
void FINDFIELD(CDatabase int CBicycle::getWheelDiameter()
m_iWheelDiameter=bcl.m_iWheelDiamet
*db); {
er;
void Save(CDatabase* db); return m_iWheelDiameter;
m_fPrice=bcl.m_fPrice;
void Read(CDatabase *db); }
m_fWeight=bcl.m_fWeight;
void Print(CDatabase* db);
m_iID = bcl.m_iID;
bool FileExist(string Way) void CBicycle::setPrice(float Price)
m_iBlockNumber =
{ {
bcl.m_iBlockNumber;
return m_fPrice=Price;
}
_access(Way.c_str(), 0) != -1; }
}
CBicycle::~CBicycle()
int getSizeInf() float CBicycle::getPrice()
{
{ {
return return m_fPrice;
}
Information.size(); }
}
void CBicycle::setMark(string Mark)
string getInform(int index) void CBicycle::setGuarantee(int
{
{ Guarantee)
m_sMark=Mark;
return {
}
Information[index]; m_iGuarantee=Guarantee;
} }
string CBicycle::getMark()
{
private: int CBicycle::getGuarantee()
return m_sMark;
vector<string> Information; {
}
}; return m_iGuarantee;
}
void CBicycle::setModel(string Model)
{
#include "cbicycle.h" void CBicycle::setGears(int Gears)
m_sModel=Model;
{
}
CBicycle::CBicycle() m_iGears=Gears;
{ }
string CBicycle::getModel()
m_sColor="noname";
{
m_sMark="noname"; int CBicycle::getGears()
return m_sModel;
m_sModel="noname"; {
}
m_sType="noname"; return m_iGears;
m_sTypeOfFrame="noname"; }
void CBicycle::setType(string Type)
m_iGears=0;
{
m_iGuarantee=0; void CBicycle::setID(int ID)
m_sType=Type;
m_iWheelDiameter=0; {
}
m_fPrice=0; m_iID=ID;
m_fWeight=0; }
string CBicycle::getType()
m_iID=-1;
{
m_iBlockNumber=-1; int CBicycle::getID()
return m_sType;
} {
}
return m_iID;
CBicycle::CBicycle(string Mark, string }
void CBicycle::setColor(string Color)
Model, string Type, string Color, string
{
TypeOfFrame, float Weight, int void CBicycle::setBlockNumber(int
m_sColor=Color;
WheelDiameter, float Price, int BlockNumber)
}
Guarantee, int Gears, int ID) {
{ m_iBlockNumber=BlockNumber;
string CBicycle::getColor()
m_sColor=Color; }
{
m_sMark=Mark;
return m_sColor;
m_sModel=Model; int CBicycle::getBlockNumber()
}
m_sType=Type; {
m_sTypeOfFrame=TypeOfFrame; return m_iBlockNumber;
void CBicycle::setTypeOfFrame(string
m_iGears=Gears; }
TypeOfFrame)
m_iGuarantee=Guarantee; #include "CBlock.h"
{
m_iWheelDiameter=WheelDiameter;
m_sTypeOfFrame=TypeOfFrame;
m_fPrice=Price; CBlock::CBlock(string _Number)
}
m_fWeight=Weight; {
m_iID=ID; Number = _Number;
string CBicycle::getTypeOfFrame()
adress = to_string(rand()
{
%1000);
return m_sTypeOfFrame;
string str = to_string(ID); }
}
str=str[str.length()-1]; CBlock::CBlock(const CBlock &bl)
m_iBlockNumber=stoi(str); {
void CBicycle::setWeight(float Weight)
} Number = bl.Number;
{
block = bl.block;
m_fWeight=Weight;
CBicycle::CBicycle(const CBicycle &bcl) adress = bl.adress;
}
{ }
m_sColor=bcl.m_sColor;
float CBicycle::getWeight()
m_sMark=bcl.m_sMark; void CBlock::WriteToFile()
{
m_sModel=bcl.m_sModel; {
return m_fWeight;
m_sType=bcl.m_sType; ofstream fout;
}
fout.open(Number + ".txt");
if (Number == "10")
m_sTypeOfFrame=bcl.m_sTypeOfFrame; void CBicycle::setWheelDiameter(int
{
m_iGears=bcl.m_iGears; WheelDeameter)
fout << 546 <<
m_iGuarantee=bcl.m_iGuarantee; {
endl;
m_iWheelDiameter=WheelDeameter;
}
}
else if (Number == "11")
{ fin >> Price; if(Param==Base[i].getType())
fout << 786 << fin >> Guarantee; {
endl; fin >> Gears; return i;
} CBicycle }
else bicycle(Mark, Model, Type, Color, if(Field=="Color")
{ TypeOfFrame, Weight, WheelDiameter, if(Param==Base[i].getColor())
fout << 765 << Price, Guarantee, Gears, ID); {
endl; return i;
} }
block.push_back(bicycle);
fout << Number << " " << if(Field=="TypeOfFrame")
}
block.size() << endl;;
for (int i = 0; i < block.size();
if(Param==Base[i].getTypeOfFrame())
i++)
{
{
fin.close(); return i;
} }
fout <<
if(Field=="Weight")
block[i].getID() << " "
int CBlock::getSize()
<<
{
block[i].getMark() << " " if(stof(Param)==Base[i].getWeight())
return block.size();
<< {
}#include "cdatabase.h"
block[i].getModel() << " " return i;
<< }
CDatabase::CDatabase()
block[i].getType() << " " if(Field=="WheelDiameter")
{
<<
block[i].getColor() << " "
} if(stoi(Param)==Base[i].getWheelDiamete
<<
r())
block[i].getTypeOfFrame() << " "
void CDatabase::Add(string Mark, string {
<<
Model, string Type, string Color, string return i;
block[i].getWeight() << " "
TypeOfFrame, float Weight, int }
<<
WheelDiameter, float Price, int if(Field=="Price")
block[i].getWheelDiameter() << " "
Guarantee, int Gears, int ID)
<<
{
block[i].getPrice() << " " if(stof(Param)==Base[i].getPrice())
CBicycle
<< {
tmp(Mark,Model,Type,Color,TypeOfFra
block[i].getGuarantee() << " " return i;
me,Weight,WheelDiameter,Price,Guarant
<< }
ee,Gears,ID);
block[i].getGears() << endl; if(Field=="Guarantee")
Base.push_back(tmp);
}
fout.close();
} if(stoi(Param)==Base[i].getGuarantee())
}
{
void CDatabase::Delete(int Index) return i;
{ }
void CBlock::ReadFromFile()
Base.erase(Base.begin()+Index); if(Field=="Gears")
{
}
string adress;
string Mark; if(stoi(Param)==Base[i].getGears())
void CDatabase::LoadBase(string Way)
string Model; {
{
string Type; return i;
//дописати
string Color; }
}
string TypeOfFrame;
float Weight; }
int CDatabase::FindID(int ID)
int WheelDiameter; return -1;
{
float Price; }
for(int i=0; i<Base.size(); i++)
int Guarantee;
{
int Gears; void CDatabase::Edit(int ID, string Mark,
if(ID==Base[i].getID())
int ID; string Model, string Type, string Color,
{
string sName; string TypeOfFrame, float Weight, int
return i;
int size; WheelDiameter, float Price, int
}
Guarantee, int Gears)
}
ifstream fin; {
return -1;
fin.open(Number+".txt"); int index=FindID(ID);
}
fin >> adress; Base[index].setMark(Mark);
fin >> sName; Base[index].setModel(Model);
int CDatabase::FindField(string Field,
fin >> size; Base[index].setType(Type);
string Param)
if (size>0) Base[index].setColor(Color);
{
for (int i = 0; i < size; i++)
for(int i=0; i<Base.size(); i++)
{
{ Base[index].setTypeOfFrame(TypeOfFra
if(Field=="Mark") me);
fin >> ID; if(Param==Base[i].getMark()) Base[index].setWeight(Weight);
fin >> Mark; {
fin >> Model; return i;
Base[index].setWheelDiameter(WheelDia
fin >> Type; }
meter);
fin >> Color; if(Field=="Model")
Base[index].setPrice(Price);
fin >> if(Param==Base[i].getModel())
Base[index].setGuarantee(Guarantee);
TypeOfFrame; {
Base[index].setGears(Gears);
fin >> Weight; return i;
}
fin >> }
WheelDiameter; if(Field=="Type")
6. ВИСНОВОК

В ході виконання цієї лабораторної роботи я розглянув органiзацiю i


ведення файлiв прямого доступу; набув практичнi навички у програмуваннi
алгоритмiв доступу хешуванням. Проаналізував помилки, які були пов’язані з
організацією файлу бази даних та видаленням пустих блоків переповнення.

You might also like