CS6400 Exam Prep Questions Solved 100% Correct |
Verified Answers
How do we guarantee lossless joins? - ✔✔The join field must be a key in at least one of the
relations
How do we guarantee preservation of functional dependencies? - ✔✔The meaning implied
by the remaining functional dependencies must be the same
In a transitive dependency, even though we don't see Email --> Salary explicitly, we see it
implicitly with transitivity
3NF and BCNF - ✔✔There does exist relations which can only be decomposed into 3NF, but
not to BCNF, while being lossless and dependency preserving
It can only happen when the relation has overlapping keys
Main Memory (RAM - Random Access Memory) - ✔✔is volatile, fast, small, and expensive
Secondary Memory -- Disk - ✔✔permanent, slow, big and cheap
Computer Architecture - ✔✔Applications run by the CPU can only query and update data in
main memory
Data must be written back to secondary memory after it is updated
Only a small fraction of a real database fits in main memory
, necessary to have buffer management programs (BUS) that will allow us to transport the data
from disk to main memory when it is to be operated on, and written back again
vast majority of the database will be stored on disk
Main Memory access time - ✔✔30 nanoseconds (.3 x 10^-7 sec)
Disk access time - ✔✔10 milliseconds (1 x 10^-2 sec)
is 5 orders of magnitude slower than main memory
In the amount of time it would take to do a single disk access, it would take 3 x 105 main
memory accesses
The time difference is so large that when we do cost computations (CPU) in database access we
completely ignore the amount of computing time that is spent in main memory and we count
only disk access time (I/O cost)
Records - ✔✔It is possible to store several records on a single block
2 ways of thinking about a block that might not fill a complete record at the end -
✔✔spanned representation
unspanned representation
If record sizes are larger than block sizes, you don't have a choice and must use spanned
Spanned representation - ✔✔break up the record across two blocks
Verified Answers
How do we guarantee lossless joins? - ✔✔The join field must be a key in at least one of the
relations
How do we guarantee preservation of functional dependencies? - ✔✔The meaning implied
by the remaining functional dependencies must be the same
In a transitive dependency, even though we don't see Email --> Salary explicitly, we see it
implicitly with transitivity
3NF and BCNF - ✔✔There does exist relations which can only be decomposed into 3NF, but
not to BCNF, while being lossless and dependency preserving
It can only happen when the relation has overlapping keys
Main Memory (RAM - Random Access Memory) - ✔✔is volatile, fast, small, and expensive
Secondary Memory -- Disk - ✔✔permanent, slow, big and cheap
Computer Architecture - ✔✔Applications run by the CPU can only query and update data in
main memory
Data must be written back to secondary memory after it is updated
Only a small fraction of a real database fits in main memory
, necessary to have buffer management programs (BUS) that will allow us to transport the data
from disk to main memory when it is to be operated on, and written back again
vast majority of the database will be stored on disk
Main Memory access time - ✔✔30 nanoseconds (.3 x 10^-7 sec)
Disk access time - ✔✔10 milliseconds (1 x 10^-2 sec)
is 5 orders of magnitude slower than main memory
In the amount of time it would take to do a single disk access, it would take 3 x 105 main
memory accesses
The time difference is so large that when we do cost computations (CPU) in database access we
completely ignore the amount of computing time that is spent in main memory and we count
only disk access time (I/O cost)
Records - ✔✔It is possible to store several records on a single block
2 ways of thinking about a block that might not fill a complete record at the end -
✔✔spanned representation
unspanned representation
If record sizes are larger than block sizes, you don't have a choice and must use spanned
Spanned representation - ✔✔break up the record across two blocks