Professional Documents
Culture Documents
BUKC
C# and Databases
Student Assignment # 2
Activity 0: Setting up the database
Create your AlbumDB database according to the following ER diagram:
Visual Programming C#
BUKC
Activity 4: Adding more database functionality to forms using C#
Using Dropdown.php from Activity 3, implement the functionality associated with the Delete
button.
When the Delete button is pressed after selecting an Album from the drop-down list, delete the
selected album from the Album database.
Demonstrate your modified Dropdown by deleting the album ddd, demonstrating that it is no
longer on the list.
Activity 5: More subtle database operations using C#
When you deleted an album from the database in Activity 4, it is likely you created a referential
integrity problem because entries in the AlbumSongs table may still exist that relate songs in the
database to the deleted album.
For this activity, modify Dropdown from Activity 4 so that when an album is deleted, all of the
entries stored on the AlbumSongs table for the deleted album as well as the album. Remember that a
song may belong to more than one album, so do not delete the songs.
Activity 6: More database operations using C#
For this activity, create an interface that allows the user to select a band from a list (combo-box).
After the user selects a band and clicks on the Submit button, the interface display a list of albums
associated with that band.
o Name your application, BandName
o Construct a form containing a combo-box that is populated with the name of each band
contained in the database. Hint: Use Activity 3 as an example of how to populate the combo box.
o Add a label to the combo-box, Band Name:.
o When the Submit button is selected, query the database to retrieve and display the list of
albums associated with this band.
Question 2: Create a Windows application that should display the movement of a car using timer control.
And application should be able to play and stop the car.