Requirements-Things the database has to do (for each stakeholder)
The database must
• Allow registered users to post reviews
• Registered users can enter comments on Reviews
• Track books and authors
• Books reviewed will be rated
• Keep track of registered reviewers
• Assign categories to books
• The database will be searchable by Title, ISBN,
Author, Rating, Category, Date of Review, Reviewer,
publication date
Security Requirements
• Only registered users can leave reviews or comments
• A Registered user can only edit their own reviews
and comments
• All users can read and search database content
Business Rule
More how information is entered and accessed
• Only Registered users can enter reviews Comments
• Only Registered users can leave comments
• All reviews and comments must be signed
• To register a user must agree to terms,
provide a username and password and an valid email
• All passwords will be hashed
• Numerical ratings will be from 1 to 5 with 5 being best
• For a new review, if the book is not currently in the
database, the reviewer will enter it.
• Allow reviews of self-published books
• Violation of terms can get a reviewer removed from
database
Entities and Attributes
Nouns: users, Reviews, comments, books, authors, reviewers, categories, passwords, titles, ISBN, ratings, Publication Date, Email
Entities—people or objects the database is concerned with (These will probably become your tables)
Users
Books (Title, ISBN, Publication Date)
Authors (Name, Dates, Country of Origin)
Reviews (Date, Rating, Reviewer, book, Review)
Reviewers (username, password, email)
Categories (Category Name, Category Description)
Comments (Date, Book, Reviewer, Comment)
Keys
Candidate Keys –potential primary keys
Natural keys—are attributes that belong naturally to the entity
Surrogate keys—randomly assigned numbers or values
Composite keys—combinations of attributes to for a key
No comments:
Post a Comment