You are on page 1of 3

Chris Grenard Wednesday, November 26, 2008

Assignment #6

Chapter 6 – Review Questions [1,3,4,5,8]

Question 1: Define each of the following terms


a. file organization – a method of storing and arranging records on a physical storage
medium.
b. sequential file organization – an organization scheme where files are stored in
sequential order, usually determined by the primary key value
c. indexed file organization – the storage of records with an index that points to the
physical location of the file on the disk
d. hashing file organization - the storage of records using an indexing scheme that
generates unique physical file locations using a hashing algorithm to create a
unique location value.
e. Denormalization – the process of un-structuring normalized relations in order to
achieve database performance improvements. Data that may be in 2 or more
tables can be combined into one table so long as unique records still exist after
denormalization.
f. composite key – a primary key which consists of two or more values that when
combined form a unique identifier for each row in a given table.
g. secondary key – one or more fields in a table row that may have duplicate value
combinations in the same table.
h. data type – the DBMS recognized expected field entry for a given database field,
examples: integer, text, datetime
i. bitmap index – a matrix that organizes row locations and row counts for indexed
fields in a table.
j. RAID – Redundant Array of Inexpensive Disks, used to improve access speed,
enable partitioning and striping, and provide redundancy in case of a drive failure.

Chris Grenard CSC602 Assignment 6


k. Join index – an index present on two or more tables that indexes the same values
in each table involved in the join.
l. Stripe – the process of spreading data across multiple drives in a RAID array to
balance load across all available drives. Striping keeps all drives equally busy
with I/O operations.
m. Explain Plan – a text or graphical representation of query costs as reported by the
DBMS. It can show where excessive time is being spent on a query operation and
be used to improve performance in recognized trouble spots.

Question 3: Contrast the following terms –


a. horizontal partitioning; vertical partitioning: horizontal partitioning puts the rows
of a table into many different files, whereas vertical partitioning puts the columns
of a table into many physical records
b. physical file; tablespace: a physical file is the data file stored on a hard drive and
the tablespace is contained within the physical file and contains the database
tables.
c. physical record; physical file: a physical record are the contiguous memory
locations assembled as a result set from the DBMS, a physical file is the data file
that holds all of the relational data on the hard drive.
d. page; physical record – a page is the amount of data returned as an I/O request, a
physical file is the data file stored on a hard drive
e. secondary key; primary key – a secondary key is one or more fields in a table row
that may have duplicate value combinations in the same table, a primary key is
always a unique value that identifies one and only one row in a table.

Question 4: What are the major inputs into physical database design?
Normalized (and in some cases denormalized) relations, all fields and data types
identified, data usage predictions/analysis, expected response time, data constraints and
validation rules, security, and backup procedures.

Chris Grenard CSC602 Assignment 6


Question 5: What are the key decisions in physical database design?
-Choosing the appropriate storage format: single drive, RAID array?
-Ensuring that relations are properly grouped when assembled into physical records
-File organization – selection of an indexing scheme
-Selecting the correct indexes on tables
-Determining the best way to use the file organization and indexing schemes to optimize
database performance

Question 8: What are the objectives of selecting a data type for a field?
- by selecting the data type of a field we use the minimum amount of space to store
its values
- we ensure that fields do not accept incorrect data types, i.e. text in a datetime field

Problems & Exercises


Question 1a: There should be three indexes created for this query to optimize its
performance:
1) Index (STUDENT.StudentId) – this is the primary key and should be indexed
by default
2) Index (STUDENT.StudentId, STUDENT.GPA) – this index combines the
primary key and an attribute (GPA) used in the WHERE clause of the query
3) Index (REGISTRATION.Student_Id) - this index should be created as it is
being used as a join field with the student table

Question 1b:
1) CREATE UNIQUE INDEX STUDENTINDEX ON STUDENT(STUDENT_ID)
2) CREATE UNIQUE INDEX STUDENTINDEX ON STUDENT(STUDENT_ID,GPA)
3) CREATE INDEX STUDENTINDEX ON REGISTRATION(STUDENT_ID)

Chris Grenard CSC602 Assignment 6

You might also like