Entity Structures

Entity = BOOK
Attribute / Data Type / Length / Format/Example
ISBN / Text / 14 / Primary Key
Title / Text / 50
Author / Text / 20
Type / Text / 14 / Lookup
Reading Level / Integer / 1 / Lookup
Date of publication / Date/Time / Short Date
Publisher / Text / 50
Genre / Text / 35 / Lookup
Number of pages / Integer / 4
Entity = STUDENT
Attribute / Data Type / Length / Format/Example
StudentID / Autonumber / Long integer / Primary Key
Forename / Text / 25
Surname / Text / 20
Reading Level / Integer / 1 / Lookup
Class / Text / 1 / Lookup
Entity = COPY
Attribute / Data Type / Length / Format/Example
CopyID / Autonumber / Long integer / Primary Key
ISBN / Text / 14 / Foreign Key (BOOK)
Copy / Number / 2 / Default value=1
Entity = LOAN
Attribute / Data Type / Length / Format/Example
LoanID / Autonumber / Long integer / Primary Key
Date taken out / Date/Time / Short Date / Default Value =
TODAY’S DATE
StudentID / Integer / Long integer / Foreign Key (STUDENT)
CopyID / Integer / Long integer / Foreign Key (COPY)
Date returned / Date/Time / Short Date / Return Date<=Date Taken out+7 DAYS
Entity = HOLIDAY
Attribute / Data Type / Length / Format/Example
HolidayID / Autonumber / Long integer / Primary Key
Date / Date/Time / Short Date

Validation

Entity = BOOK
Attribute / Validation Type / Rule / Error Message
ISBN / Format / Input mask:
0&CCCC / ISBN must include 9 or 13 digits
Type / Lookup / Lookup from list: Non-Fiction, Fiction, Big Book, Reading scheme, Class readers, Poetry / Select a Type of Book from the list
Reading Level / Lookup / Lookup from list: 1,2,3,4,5,6,NA / Select a Reading level from the list
Date of publication / Range / >Now()-10years / Book too old
Genre / Lookup / Lookup from list: *(look below) / Please select a genre
Entity = STUDENT
Attribute / Validation Type / Rule / Error Message
Forename / Format / L???????????????????????? / Must enter forename
Surname / Format / L??????????????????? / Must enter surname
Reading Level / Lookup / Lookup from list: 1,2,3,4,5,6 / Select a Reading level from the list
Class / Lookup / Lookup from list: 1,2,3 / Must enter class
Entity = COPY
Attribute / Validation Type / Rule / Error Message
ISBN / Lookup / Lookup from Book entity / Incorrect ISBN
Entity = LOAN
Attribute / Validation Type / Rule / Error Message
StudentID / Lookup / Lookup from Student entity / Incorrect StudentID
CopyID / Lookup / Lookup from Copy entity / Incorrect CopyID

Hannah Glasspool6292

Entity Relationship Diagram

Hannah Glasspool6292