csci3170 introduction to database systems tutorial 2 – project specification 1

24
CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

Upload: joy-lester

Post on 28-Dec-2015

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

1

CSCI3170 Introduction to Database Systems

Tutorial 2 – Project Specification

Page 2: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

2

Outline Introduction Data Specification Assumption System Function

Page 3: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

3

Introduction Library Inquiry System

You need to implement a library inquiry system Language: JAVA JDK 6.0 (with JDBC) Platform: Windows 7 Enterprise (32 bits) Database: Oracle Database 11g Enterprise

Edition (r11.1.0.6.0)

Database accounts will be given to you after group registration phase

Tutorials will be given on Oracle, JAVA and JDBC

Page 4: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

4

Grouping Each Group should have 3 students Form your groups online at course webpage

Deadline: 30, Sept, 2011 Students who do not form groups after the deadline

will be assigned into groups by tutors If you want to have group of 2 students

Please send an email to the tutor (pywong) We will try our best to arrange it

One more student may be assigned to the groups if there are single students

Groups will be finalized by 7 Oct 2011 Please check the course webpage and email (if any)

for details

Page 5: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

5

Project Milestones Phase 1 (15%)

E-R diagram design (hard-copy) A suggested ER diagram will be released after the

deadline Phase 2 (20%)

Relational schema design and Proof of 3rd Normal Form(hard-copy)

A suggested schema will be released after the deadline

Phase 3 (65%) Implementation of the system (soft copy) Final Report (hard-copy) Demo

Page 6: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

6

Timeline

Phase Deadline

Group registration 30 Sept 2011

Phase 1 14 Oct 2011

Phase 2 28 Oct 2011

Phase 3 25 Nov 2011

DEMO 29 Nov 2011 (Tentative)

Page 7: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

7

Data Specification The data are in four categories

User category Library user Book information Checked-out book copy

They are used for explanation purpose only Not meant to be the tables in the final schema

Page 8: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

8

Data Specification The user category determines the permission

of users Category ID

A unique identifier for a category Max Books

The maximum number of books that a user can borrow Loan Period

The number of days that a user can borrow a book

Page 9: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

9

Data Specification The following information of a user are stored

User ID A unique identifier of a user (like student id in CUHK

library system) Name

The name of a user Address

The contact address of a user Category ID

The user category that a user belongs to

Page 10: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

10

Data Specification The following information of a book are stored

Call number A unique identifier for each book

Number of copies The number of identical copies of a book Each copies of the same book are distinguished by copy

number Title

The title of a book Author(s)

Author name(s) of a book Date of publication

The date that a book is published

Page 11: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

11

Data Specification The checked-out book stored which book

copies are checked-out Call number

The number of the checked-out book copy Copy number

The copy number of the checked-out book copy User ID

The user which borrow the book Check-out date

The date that the book is checked-out

Page 12: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

12

Assumptions and Regulations System

All numerical values are less the 232 The system is case sensitive

User Category The category ID is unique

Page 13: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

13

Assumptions and Regulations Library User

The user ID is unique The user name is not unique The user address is not unique A user can belongs to only one category

Page 14: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

14

Assumptions and Regulations Book information

A book copy is uniquely identified by the call number and copy number

The copy number begins with one For one copy, the copy number is 1 For N copies, the copy numbers are 1,2,…, N

An author is uniquely identified by his/her name An author writes a book rather an author writes an

book copy Each book have at least one author Each author record in the database must be an

author of at least one book A book can have more than one author

Page 15: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

15

Assumptions and Regulations Checked-out book copy

A library user can never checked-out any book copies

A book copy can never been checked-out

Sample Datasets A sample dataset will be provided to you after

phase 2 for testing your implementation

Page 16: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

16

System Functions You have to implement three interfaces

Administration interface Enquiring interface Evaluation interface

You can implement user interface in command line mode You are welcome to implement GUI But no extra marks for GUI

Page 17: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

17

System Functions Administration Interface

Create table schemas in the database Delete table schemas in the database Load data into the database

Your system should read data files and insert them into the appropriate tables

Please make sure that it can read the sample data provided

A sample data reader will also be posted on the course webpage

Page 18: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

18

System Functions Enquiring interface

Search for books (only one method per query) By call number (exact matching) By title (partial matching) By author (partial matching)

Output should include Call number Title Author(s) Number of available copies List of checked-out copies

Page 19: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

19

System Functions Enquiring interface

Show loan status (one method per query) By user ID (exact matching) By user name (exact matching)

Output should include User ID Name Address List of books checked-out by the user

Page 20: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

20

System Functions Enquiring interface

Check book overdue information The user input a date The system output all books that are overdue on or

before that date The output is in ascending order of due date

Output should include Name of borrower Call number Copy number Title Checked-out date Due date

Page 21: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

21

System Functions Enquiring interface

Show newest books The user input a number n The system output all books that are published within n

days The output is in ascending order of publication date

Output should include Call number Title Author(s) Number of available copies

Page 22: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

22

System Functions Evaluation Interface

Show all information of the database tables Show the number of users in each category

The output should be in descending order of the number of users

Show the N most productive authors The user input a number N The system output the top N authors that published the

most number of books The output should be in descending order of the

number of published books If there are authors who have the same number of

books as the Nth author, they should also be output

Page 23: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

23

Demo

Page 24: CSCI3170 Introduction to Database Systems Tutorial 2 – Project Specification 1

24

Q&A