Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Appendix A. Answers to Quiz Questions
Quiz
1:
What is a relational database?
A1:
It's a database in which multiple tables are related to each other using foreign key relationships. This methodology is used to minimize redundant information, and for efficiency.
2:
What does SQL stand for, and what does it do?
A1:
SQL is the Structured Query Language and is used to communicate with databases.
3:
What does ODBC stand for?
A1:
Open Database Connectivity.
4:
True or False: You can access any ODBC-compliant database through ASP.NET.
A1:
True.
5:
What are the five steps to accessing a database from ASP.NET?
A1:
Set up a database connection.
Open the database connection.
Fill a Dataset with the desired data.
Set up a Dataview to display data.
Bind a server control to the Dataview.
Exercise
1:
Create your own database from scratch and use it to store information on pets that you've owned. (If you've never owned any, make some up!) What fields do you need?
A1:
Possible fields include pet name, pet type (dog, cat, and so on), years owned, and last vet visit. Don't forget to set a primary key. You can query the data using the SQL statements you've learned today.
2:
Play with Listing 8.1 specifically, the DataList control. Modify the formatting tags in the template to see how you can change the display, and use what you know about ASP.NET server controls to change the properties of the DataList control.