Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
BU 5010 Database Applications for Managers Dr. Ebrahimi
Test 1 True / False Spring 2005
Name______________________________________
T 1) A database has operations such as storing, displaying, and searching for records.
T 2) A file should be closed before it is opened again in another operation mode.
T 3) A file can be accessed sequentially as well as randomly.
F 4) The most efficient way to delete from a file is to copy the entire file, excluding deleted data.
T 5) Random access becomes faster if each record has a fixed length with a unique key.
T 6) Binary files store the binary value of a number instead of its ASCII value.
F 7) Modification is more difficult in arrays rather than in a sequential file.
F 8) It is better to store large amounts of data into an array rather than into a file.
T 9) Information in an array will be lost after the program terminates.
T 10) In sequential files, modification requires duplication of the existing file.
T 11) A data file is a file in which data is stored and from which data is retrieved.
T 12) In random access there is no need for duplication of the file when deleting a record.
F 13) When deleting a record from an array, the physical storage will be deleted.
T 14) It is necessary to shuffle an array upon deletion to make the insertion faster.
T 15) If the array is not shuffled after deletion, it is necessary to indicate that the record was deleted.
F 16) HTML is the language of choice for building a database because it has regular expressions built into the language.
F 17) One person having many credit cards is an example of a many-to-many relationship.
F 18) The most important function in a database is delete.
F 19) A database can have at most one table.
T 20) The importance of normalization of a database is to eliminate waste of memory and redundancy of data.
T 21) Simple file encryption can be done by changing ASCII values or by using an associate array.
F 22) A data file is an executable file that performs a database function.
F 23) A database report is used by managers to enter new records to a database.
T 24) Visual Basic .Net applications can access and update data stored in text files as well as Oracle, Microsoft Access, and other databases.
T 25) PHP is a server-side scripting language that supports many databases, including MySQL.
T 26) A for loop in PHP is used to repeat a task many times.
T 27) PHP and MySQL can be used together to create a website that can access records of a database.
F 28) The following MySQL code will add a record to the employee table:
mysql_query("SELECT * FROM employees",$db);
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.
F 30) Creating relationships between tables increases data redundancy and makes a database less efficient.
F 31) Google is an example of a website that searches a single file to return meaningful data to the user.
F 32) The following SQL command will retrieve all overtime employees:
SELECT * FROM Employees
WHERE HoursWorked<40
T 33) The following SQL command will insert a record into the Employees table:
INSERT INTO Employees
VALUES ('John', 'Doe', 'IT', 35.50, 60)
F 34) The following SQL command will compute an employee’s gross pay:
UPDATE Employees SET HourlyRate = 50.00
WHERE LastName = 'Ebrahimi'
T 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 36) A CGI takes information from forms on a Web page, processes it, and sends a response in the form of an HTML page.
F 37) The UNIX command rmdir public_html will create a directory in which you can store web pages.
T 38) The UNIX command chmod 755 index.html will make your web page accessible from the Internet.
F 39) A binary search is fastest for searching a large unsorted data file.
T 40) Database validation of user input is necessary for fields such as phone number and social security to ensure data integrity.
F 41) Sequential search is preferred over hashing because of the speed.
F 42) The two important directories for CGI are user directory and root directory.
F 43) In Perl or PHP, a variable starting with a $ indicates that the variable type is character.
F 44) Access will not allow you to create a one to many relationship due to security.
F 45) Semantic databases are based on the grammar of the expression.
F 46) The commands request and response belongs to JSP.
T 47) You can create CGI web databases using the following programming languages: C/C++ and Perl.
F 48) The following code discards the first three characters of the input string:
cin>>str;
int i=2;
int n=0;
for(i=2;str[i]!='&';i++){
fname[n]=str[i];
n++;}
T 49) The following code will load one record from the file employee.txt:
ofstream record("employee.txt",ios::app);
record<