Designing a Database Activity:
Jake's Cert IV Blog
Tuesday, October 12, 2010
Monday, October 11, 2010
Database Blog Task
1. What does a column in a table represent?
Field
2. What does a row in a table represent?
Record
3. What does DBMS stand for?
Database Management System
4. What is a primary key in a table used for?
A unique field used to create relationships between different tables.
5. Why is the ID column such a useful field?
Its useful for uniquely identifying records, especially those that share similar details such as a first name and last name.
6. What Access data type would you use to store the string “18 Segway Drive, Moonville” ?
Text
7. What Access data type would you use to record True/False values?
Boolean
8. What Access data type would you use to store a number?
Number
9. What Access data type would you use to store a long string such as an essay or report?
Memo
10. A database is a collection of what?
Tables
11. A table is made up of what?
Records
12. What is a record?
A row of information in a table such as first name, last name and various other information such as telephone numbers, address etc.
13. Are spaces allowed in field names?
No.
Field
2. What does a row in a table represent?
Record
3. What does DBMS stand for?
Database Management System
4. What is a primary key in a table used for?
A unique field used to create relationships between different tables.
5. Why is the ID column such a useful field?
Its useful for uniquely identifying records, especially those that share similar details such as a first name and last name.
6. What Access data type would you use to store the string “18 Segway Drive, Moonville” ?
Text
7. What Access data type would you use to record True/False values?
Boolean
8. What Access data type would you use to store a number?
Number
9. What Access data type would you use to store a long string such as an essay or report?
Memo
10. A database is a collection of what?
Tables
11. A table is made up of what?
Records
12. What is a record?
A row of information in a table such as first name, last name and various other information such as telephone numbers, address etc.
13. Are spaces allowed in field names?
No.
Monday, October 4, 2010
File Handling in VB.NET
1. Which of the following methods can be used to open a sequential access file?
AppendText(), CreateText() and OpenText().
2. Which of the following writes the contents of the favouriteTuneTextBox’s Text property, followed by the newline character, to the sequential access file associated with the outFile variable?
outFile.WriteLine(favouriteTuneTextBox.Text)
3. What does IO in the syntax stand for?
Input/Output
4. Which of the following procedures can be used to read information from a sequential access file?
OpenText()
5. Which of the following reads a line of text from the file associated with the inFile variable and assigns the line of text (excluding the newline character) to the msg variable?
msg = inFile.ReadLine()
6. Write the statement required to close the file associated with the inFile variable.
inFile.Close()
7. If a sequential access file contains another character to read, what does the Peek method return?
The Peek method returns the next character if it exists otherwise it returns -1.
8. If a sequential access file does not contain another character to read, what does the Peek method return?
-1
AppendText(), CreateText() and OpenText().
2. Which of the following writes the contents of the favouriteTuneTextBox’s Text property, followed by the newline character, to the sequential access file associated with the outFile variable?
outFile.WriteLine(favouriteTuneTextBox.Text)
3. What does IO in the syntax stand for?
Input/Output
4. Which of the following procedures can be used to read information from a sequential access file?
OpenText()
5. Which of the following reads a line of text from the file associated with the inFile variable and assigns the line of text (excluding the newline character) to the msg variable?
msg = inFile.ReadLine()
6. Write the statement required to close the file associated with the inFile variable.
inFile.Close()
7. If a sequential access file contains another character to read, what does the Peek method return?
The Peek method returns the next character if it exists otherwise it returns -1.
8. If a sequential access file does not contain another character to read, what does the Peek method return?
-1
Tuesday, August 17, 2010
Exception hierarchy
1. Find & show the inheritance hierarchy for the above exception types. (Read the documentation at MSDN)
OverflowException:
System.Object
System.Exception
System.SystemException
System.ArithmeticException
System.OverflowException
InvalidCastException:
System.Object
System.Exception
System.SystemException
System.InvalidCastException
IndexOutOfRangeException:
System.Object
System.Exception
System.SystemException
System.IndexOutOfRangeException
NullReferenceException:
System.Object
System.Exception
System.SystemException
System.NullReferenceException
OverflowException:
System.Object
System.Exception
System.SystemException
System.ArithmeticException
System.OverflowException
InvalidCastException:
System.Object
System.Exception
System.SystemException
System.InvalidCastException
IndexOutOfRangeException:
System.Object
System.Exception
System.SystemException
System.IndexOutOfRangeException
NullReferenceException:
System.Object
System.Exception
System.SystemException
System.NullReferenceException
Keyword for throwing an exception
1. Which keyword is used to throw an exception?
"Throw"
2. Looking at the diagram below, discuss the options for exception handling. Should the exception be handled? If so, where should it be handled? Should it be rethrown? Why? Why not?

The exception should be handled on A and should be rethrown at B and C. This is because A is calling B and B is calling C. If C gets an exception, that should be rethrown for B and then B should rethrow it to A so it can be handled properly.
"Throw"
2. Looking at the diagram below, discuss the options for exception handling. Should the exception be handled? If so, where should it be handled? Should it be rethrown? Why? Why not?

The exception should be handled on A and should be rethrown at B and C. This is because A is calling B and B is calling C. If C gets an exception, that should be rethrown for B and then B should rethrow it to A so it can be handled properly.
Inheriting the exception class
1. What Visual Basic keyword is used to implement inheritance in a class?
"Inherits"
2. In the event of an exception, what does the Message property of the Exception class contain?
It contains a string that tells the user what the problem is.
Which keyword gives a child class access to all of it’s parent’s public & protected members?
"MyBase"
What is the first statement in a child class constructor?
"MyBase.New(ErrorMessage)"
"Inherits"
2. In the event of an exception, what does the Message property of the Exception class contain?
It contains a string that tells the user what the problem is.
Which keyword gives a child class access to all of it’s parent’s public & protected members?
"MyBase"
What is the first statement in a child class constructor?
"MyBase.New(ErrorMessage)"
Monday, August 9, 2010
NullReferenceException Questions
1. What warning does the Visual Studio IDE provide with regards to using variables before they have been assigned a value? What does the warning look like? What does it say?
Variable 'ThisPlayer1' is used before it has been assigned a value. A null reference exception could result at runtime.
2. Post a screen shot of the resulting message box.
Variable 'ThisPlayer1' is used before it has been assigned a value. A null reference exception could result at runtime.
2. Post a screen shot of the resulting message box.
Subscribe to:
Posts (Atom)