Monday, November 14, 2011

Multiplicity within Tables

Databases 1

1. What does a column in a table represent?
 A field.

2. What does a row in a table represent?
A record. 


3. What does DBMS stand for?
Database Management System.

4. What is a primary key in a table used for? 
Identifying records uniquely.

5. Why is the ID column such a useful field?
Because if you know the primary key/ID of a record, you can do anything with that record.


6. What Access data type would you use to store the string “18 Segway Drive, Moonville” ?
The Text data type.

7. What Access data type would you use to record True/False values?
Yes/No

8. What Access data type would you use to store a number?
The Number data type.

9. What Access data type would you use to store a long string such as an essay or report?
The Memo data type. 


10. A database is a collection of what?
A database is a collection of related data stored in a structured format.


11. A table is made up of what?
Rows and columns.

12. What is a record?
 A record is a group of related fields containing all of the information about a specific person, place or thing

13. Are spaces allowed in field names?
Yes, but it is not good practice.

Sunday, September 18, 2011

[Research] Visual Basic - The Object Class


There is a class called X that contains the following overridable methods:
Run()
Walk()
Hide()
There is a class Y that inherits from class X. Is Y able to override the Run, Walk & Hide methods in X?
Yes, Y can override the methods from class X, since X is the parent. X can call it's own functions even if Y overrides them, but Y if it overrides X's methods cannot access X's original methods only the newly written overriding one.

[Code] Visual Basic - GameSignUp Inheritance

What is the base class of the user class (GameSignUp.vb) you have created?
GameSignUp is based solely off the Object class.


Which methods does your user class (GameSignUp.vb) inherit from this class?
Equals(Object)
Equals(Object, Object)
Finalize()
GetHashCode()
GetType()
MemberwiseClone()
ReferenceEquals()
ToString()

[Research] Visual Basic - ToString

The ToString for my GameSignUp class output "GameSignup.GameSignUp". This was actually fairly useful as it states the owner and the class, so I can tell it is an object of GameSignUp in the solution GameSignup.

[Research] Visual Basic - The Object Class

What is the purpose of the object class?
The Object class is the ultimate "parent" class, all objects are based off it. It's the root of type hierarchy.

How many constructors does it contain?
Just one.

How many methods does it contain?
It contains 8 methods.

What is the purpose of the ToString method?
ToString outputs a string that is basically the "name" of the object.

Monday, September 5, 2011

[Research] Visual Basic - Debugging (Types of Errors)

There are 3 types of Programming errors;
Syntax - Literally the user writing bad code, or code the compiler does not understand. An example of this is that you cannot write a Procedure block within a Namespace block.
Run-Time - Errors that appear as the program runs, due to errors that were not picked up by syntax, eg giving a function bad parameters.
Logic - These are not "Errors" that the compiler throws, rather, unwanted output. Eg, dividing a rectangle's width by height to get area instead of multiplying them.

The Error List window displays Syntax errors.