CST272 Final Project

"Tables"


  1. The "FacePamphlet" database consists of the following three tables, to be created in Microsoft SQL Server (or Microsoft Access or MySQL):
  1. The Members table:
Column name Data type Size Description
EMail varchar 40 Member's e-mail and login name (the primary key)
LastName varchar 20 Member last name
FirstName varchar 20 Member first name
  1. The Posts table:
Column name Data type Size Description
PostID int   Automatically generated sequence number
(Identity Specification: Yes)
(joined with EMail to form the primary key)
EMail varchar 40 Member's e-mail and login name
(joined withPostID to form the primary key)
Post varchar 255 Posting on almost any topic by a member
PostDate datetime   Date and time when the post was entered
  1. The Friends table:
Column name Data type Size Description
MyEMail varchar 40 Member's e-mail and login name
( joined with FriendEmail to form the primary key)
FriendEmail varchar 40 A friend's e-mail and login name
( joined with MyEmail to form the primary key)
(Optional): Set a CheckConstraint so that no record may contain a value for 'MyEmail' that is equal to 'FriendEmail'

Do not allow nulls for any column in any table in the database

  1. The image below shows the relationships that must be created between the tables of the FacePamphlet database:
  1. FK MyEmail (Friends table) → Members (Email field)
  2. FK FriendEmail (Friends table) → Members (Email field)
  3. FK Email (Posts table) → Members (Email field)

Relationships.png