0% found this document useful (0 votes)
7 views4 pages

DB - Assignment 2 T1

Uploaded by

ali88ayyad88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

DB - Assignment 2 T1

Uploaded by

ali88ayyad88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Go Wild Wildlife Park Database

Design
Introduction
This document outlines the database design for the Go Wild Wildlife Park. The
database is designed to manage records of animals, their species, diets, keepers,
and enclosures.

Data Dictionary
Animals Table :

Field Data Type Description Validation Rules


Name

AnimalID INT Unique Primary Key, Auto-increment,


identifier Not Null

Name VARCHAR( Animal's name Not Null, Length Check (2-50)


50)

Gender VARCHAR( Animal's Not Null, Value check ("Male" or


6) gender "Female")

YearArriv INT Year animal Not Null, Range check (1990-


ed arrived current year)

SpeciesI INT Assigned Foreign Key (Species), Not Null


D Species

KeeperID INT Assigned Foreign Key (Keepers), Not Null


Keeper

Enclosur INT Assigned Foreign Key (Enclosure), Not Null


eID Enclosure

DietID INT Assigned Diet Foreign Key (Diet), Not Null

Species Table:

Field Name Data Type Descriptio Validation Rules


n
SpeciesID INT Unique Primary Key, Auto-increment, Not
Identifier Null

SpeciesType VARCHAR( Type of Not Null, Length Check (2-50)


50) species

Species Group VARCHAR( Group Not Null


50) classificatio
n

Lifestyle VARCHAR( Animal's Not null


30) lifestyle

ConservationSt VARCHAR( Conservatio Not Null, Value check ("Least


atus 30) n Status Concern", "Near Threatened",
"Vulnerable", "Endangered",
"Critically Endangered")

Diet Table

Field Data Type Description Validation Rules


Name

DietID INT Unique Primary Key, Auto-increment, Not Null


Identifier

DietType VARCHAR( Type of diet Not Null, Value check ("Carnivore",


30) "Herbivore", "Omnivore")

FeedsPerD INT Number of Not Null, Range check (1-10)


ay Daily Feeds

Keepers Table

Field Data Type Description Validation Rules


Name

KeeperID INT Unique Primary Key, Auto-increment, Not Null


Identifier

Name VARCHAR(1 Keeper's full Not Null, Length check (2-100 chars)
00) name

DateOfBi DATE Keeper's DOB Not Null, Range check (must be 18+
rth years old)
Rank VARCHAR(1 Keeper's rank Not Null, Value check ("Junior",
0) "Standard", "Senior")

Enclosures Table

Field Data Type Description Validation Rules


Name

Enclosur INT Unique Primary Key, Auto-increment,


eID Identifier Not Null

Type VARCHAR( Type of Not Null


30) enclosure

Location VARCHAR( Location in Not Null


50) park

Design Decisions
 The database is normalized to Third Normal Form (3NF) to eliminate data
redundancy.

 Separate tables for Species, Diet, Keepers, and Enclosures prevent data
duplication.

 The Animals table serves as the central entity, connecting all other tables
through foreign keys.

Relationships:
 One-to-Many relationships between Keepers and Animals, Enclosures and
Animals, Species and Animals, and Diet and Animals.

Data integrity:
 Implemented data integrity features such as primary keys, foreign keys, not
null constraints, value checks, and range checks.

Implementation
To be able to do this database, you will have to use a database management system
(DBMS) like Mysql, PosgreSql, or SQL Server. The specific steps to set up the
database will depend on the DBMS you choose, but the general process would be:

1. Create the database schema.


2. Create the tables based on the data dictionary provided.

3. Implement the data integrity constraints and relationships.

4. Populate the tables with initial data.

5. Test the database to ensure it meets the requirements.

You might also like