Journal
Wednesday February 13, 2008
Please have questions
from all areas covered, Test will be on Monday 25th 2008 100 T/F Questions.
Most questions in this example are from
chap. 9 That are important for a strong foundation of database
This is an example of last years test
BU 5010 Database Applications
for Managers
Quiz
1 True / False
Spring 2007
Name______________________________________
T /
F 1) A database has operations such as storing, displaying, and searching for
records.
T /
F 2) A file should be closed before it is opened again in another operation
mode.
T /
F 3) A file can be accessed sequentially as well as randomly.
T /
F 4) The most efficient way to delete from a file is to copy the entire file,
excluding deleted data.
T /
F 5) Random access becomes faster if each record has a fixed length with a
unique key.
T /
F 6) Binary files store the binary value of a number instead of its ASCII value.
T /
F 7) Modification is more difficult in arrays rather than in a sequential file.
T /
F 8) It is better to store large amounts of data into an array rather than into
a file.
T /
F 9) Information in an array will be lost after the program terminates.
T /
F 10) In sequential files, modification requires duplication of the existing
file.
T /
F 11) A data file is a file in which data is stored and from which data is
retrieved.
T / F 12) In random access file there is
no need for duplication of the file when deleting a record.
Answer: True there is no need for duplication.
- Give me one example of deleting a file of
database and why?
Answer: A student must be deleted from active
students after they graduated
- If you have a cassette tape containing two
song and you need to delete song one how will you do it?
Answer: copy the song one into a blank cassette
tape, if you deleted from the tape you would have a blank gap for the
length of the song.
What is a Random Access?
Answer: A CD is a random access
T /
F 13) When deleting a record from an array, the physical storage will be
deleted.
T /
F 14) It is necessary to shuffle an array upon deletion to make the insertion
faster.
T /
F 15) If the array is not shuffled after deletion, it is necessary to indicate
that the record was deleted.
T /
F 16) A Database is a
collection of related data.
T /
F 17) One person having many credit cards is an example of a many-to-many
relationship.
T /
F 18) The most important function in a database is delete.
T /
F 19) A database can have at most one table.
Answer: False - At least one table
T / F 20) The importance of
normalization of a database is to eliminate waste of memory and redundancy of
data.
Database
normalization,
sometimes referred to as
canonical synthesis,
is a technique for designing
relational database
tables
to minimize duplication of information and, in so doing, to
safeguard the database against certain types of logical or
structural problems, namely data anomalies. For example, when
multiple instances of a given piece of information occur in a
table, the possibility exists that these instances will not be
kept consistent when the data within the table is updated,
leading to a loss of
data integrity.
A table that is sufficiently normalized is less vulnerable to
problems of this kind, because its structure reflects the basic
assumptions for when multiple instances of the same information
should be represented by a single instance only.
Higher degrees of
normalization typically involve more tables and create the need
for a larger number of
joins,
which can reduce
performance.
Accordingly, more highly normalized tables are typically used in
database applications involving many isolated
transactions
(e.g. an
Automated teller machine),
while less normalized tables tend to be used in database
applications that do not need to map complex relationships
between data entities and data attributes (e.g. a reporting
application, or a full-text search application).
Database theory
describes a table's degree of normalization in terms of
normal forms
of successively higher degrees of strictness. A table in third
normal form (3NF),
for example, is consequently in second normal form (2NF)
as well; but the reverse is not always the case
T / F 21) Simple file encryption can be
done by changing ASCII values or by using an associate array.
Answer: True The sensitive material
should always be encrypted. This is Part of Internet security.
ASCII
American Standard Code for Information
Interchange
T /
F 22) A data file is an executable file that performs a database function.
T /
F 23) A database report is used by managers to enter new records to a database.
T /
F 24) A Database
Designer’s responsibility is to define the content, the structure, the
constraints, and functions or transactions against the database.
T /
F 25) A set of concepts
to describe the structure and the constraints of a database is called a data
object.
T /
F 26) Three categories
of data models are conceptual, physical, and implementation.
T /
F 27) A database schema
includes descriptions of the database structure and the constraints that should
hold on the database.
T / F 28) C++ is an example of a DBMS language.
T / F 29) A primary key is necessary to uniquely identify a record in a table; two records may have the same value in the field designated as primary key.
T / F 30) Creating relationships between tables increases data redundancy and makes a database less efficient.
T / F 31) The proper C++ code to open a text file is:
ifstream
studentFile("students.txt", ios::in);
T / F 32) In C++, the syntax code if (!fin) can be used instead of if (fin==NULL).
T / F 33) Unicode consists of 8-16 bits.
T / F 34) A database consists of many fields.
T / F 35) A load function will read all records from a file into an array and should be called at the start of a program.
T /
F 36) ifstream
fin(“data.txt”,ios::in); if(!fin) cout<<”NO FILE”; will test the file’s
existence.
T /
F 37) A file can be
opened for both input and output such as fstream fout(“data.dat”,
ios::in|ios::out);
T /
F 38) ofstream
outfile(“data.txt”, ios::noreplace); prevents an existing file from being
overwritten.
T /
F 39) A binary search is fastest for searching a large unsorted data file.
T /
F 40) Database validation of user input is necessary for fields such as phone
number and social security to ensure data integrity.
T /
F 41) Sequential search is preferred over hashing because of the speed.
T / F 42)
The
C++ system( ) function enables the programmer to use operating system commands.
Answer:
This
are some known operating systems Windows , Solaris Sparc, Solaris Intel , QNX ,
OS/2 , MacOS , Linux Sparc, Linux PowerPC, Linux i386, FreeBSD i386 , BeOS
T /
F 43) In a random access
file, seekg( ) is used for putting data and seekp( ) is used for getting data.
T /
F 44) Access will not allow you to create a one to many relationship due to
security.
T /
F 45) Semantic databases are based on the grammar of the expression.
T /
F 46) ifstream
fin(“data.txt”, ios::in); associates a file for output access.
T /
F 47) You can create CGI web databases using the following programming
languages: C/C++ and Perl.
T /
F 48) The three example databases are Access, SQL, and Oracle.
T / F 49) In order for a C++
database program to read from a textfile it is not necessary to use; #include<fstream>.
T / F 50) In a C++ database
program, it is not required that you include the name of the textfile, in order
for the program to locate it and access the data.
T / F 51) A software package/
system to facilitate the creation and maintenance of a computerized database is
known as DBA.
T / F 52)A DBMS doesn’t involve in any sort of program security or do
any active processing.
T / F 53) A set of concepts to describe
the structure of a database, and certain constraints that the database
should obey is known as Data Model Operations.
T / F 54) An entity is an object that is
distinguishable from other objects by a specific set of attributes.
T / F 55) Using
write( ) function from <fstream>, one can write an entire structure
(record) to a file.
T / F 56)By using a
linked list the deleted record will be physically deleted.
T /
F 57) Conceptual
data models describe details of how data is stored in the computer.
T /
F 58) The Entity Relationship Model consists of entities with no possible
relation to each other.
T /
F 59) In the Object Oriented Model, objects consist of data operations on the
data.
T /
F 60) The physical implementation of your database files at the lowest level is
specified at the conceptual level.