Do pin_count
and dirty
have to be in the Page
interface in a DB?
#290
Answered
by
skyzh
GavinRay97
asked this question in
Q&A
-
I'm trying to understand whether there is a special reason for putting Why I ask this question is because, if I understand right, this information is only relevant as part of the Page my_page = Page {};
// Here, the pin_count and dirty bit doesn't mean anything Is the below (or something similar) also a valid design? abstract class Page {
byte[] data;
PageId pageId;
int lsn;
}
class Frame {
PageId pageId;
FrameId frameId;
int pinCount;
boolean isDirty;
}
class BufferPoolManager {
Map<PageId, Frame> frameTable;
} |
Beta Was this translation helpful? Give feedback.
Answered by
skyzh
Aug 29, 2022
Replies: 1 comment 1 reply
-
The design looks good to me! That's all about design choices. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
GavinRay97
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The design looks good to me! That's all about design choices.