Monday, October 13, 2014

Requirements and Business Rules

Requirements:

Def: Something the database has to do in order to fulfill its purpose.

The database must store data about any book that is reviewed
The database must store Reviews and comments on Reviews
It will have a list of registered reviewers
Every review will have a numerical rating
The database will list of categories and books that belong to those categories
It must be searchable by Title, Author, Rating, Date of Review, Reviewer, Category, ISBN, Publication date

Security Rules (Access Rules)

Only registered reviewers can enter reviews and comments
A registered reviewer can only edit their own reviews and comments
Any use can read and search the database

Business Rules:

Def: (How) the way the organization processes and manages data

Only registered Reviewers can enter or edit reviews
Only registered Reviews can comment
All reviews and comments must be signed
To register the user has to agree to terms and provide a user name, a password, a valid email address
Passwords will be hashed
The numerical rating will range from 1 to 5, 5 being highest.
The lengths of reviews is unlimited.
Allow reviews of self published ebooks.
Violation of terms can get a reviewer removed from Database
Abusive reviews and comments can be removed

Nouns:

Book, author, Isbn, reviewer, email, Title, Review, Comment, Rating, Date of Review, Publication Date, Category, Password, user Name

Entities

Book
ISBN
Title
Publication date
Category
Author

Review
Book
Reviewer
Date of Review
Rating
comments

Author
name
description

etc.

Candidate Keys:

Def: an attribute or attributes that might make a good key field

Types of keys

Natural—uses attributes that belong to the entity as a key

Composite—combination of attributes that are unique

Surrogate--autogenerated

No comments:

Post a Comment