Activity 3.1 – creating a table with indexes and foreign keys
The autoclub now wants members to be able to register for events. To do this, they would like you to create a table named EventMemberRegistration
. This table will contain details about the members registered for particular events.
In this activity, perform the following steps:
- Add a new table to the
autoclub
database and name itEventMemberRegistration
. - Add the following fields to the table:
'ID' INT NOT NULL AUTO_INCREMENT,
'ClubEventID' INT NOT NULL,
'MemberID' INT NOT NULL,
'ExpectedGuestCount' INT NOT NULL DEFAULT 0,
'RegistrationDate' DATE NOT NULL,
'FeesPaid' BIT NOT NULL DEFAULT 0,
'TotalFees' DOUBLE NOT NULL DEFAULT 0,
'MemberAttended' BIT NOT NULL DEFAULT 0,
'ActualGuestCount' INT NOT NULL DEFAULT 0,
'Notes' MEDIUMTEXT NULL,
'WhenAdded' TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
'LastModified...