Professional Documents
Culture Documents
Presented to:
Page 1
Table of Contents
1. Introduction ........................................................................................ 3 2. System Design ................................................................................... 4 2.1 System Architecture ........................................................................ 4 3. User Interface Layer........................................................................... 6 3.1 Prototype ......................................................................................... 7 4. Business Layer................................................................................... 8 4.1 Class Diagram................................................................................. 8 4.2 Sequence Diagrams..................................................................... 9 4.3 State Diagrams .......................................................................... 18 5. Persistence Layer ............................................................................ 19 5.1 Database Assumption ................................................................... 19 5.2 Class Diagram for the persistence layer ....................................... 19 5.3 Data Model Diagram ..................................................................... 19 5.3 Database Schema......................................................................... 22
Page 2
1. Introduction
The Architectural Design document provides a high-level overview of the structural and architecture of the entire system. Also the Architectural Design document provides a more detailed description of the components of the system. Information is provided on interactions and relationships among various sub-components of the system as well as a detailed description of the pages corresponding to each function and each module. The databases design is a list of everything a designer, programmer, or tester needs to know to set up the database and to provide the connection between each function and the database tables.
Page 3
2. System Design
The system includes the following subsystems: Client: The client interacts with the system through a classic Windows interface. The users will access the system in different ways depending on their privileges. Server: The server is represented by the database server that stores the entire information of the Museum system. 2.1 System Architecture The system is design as an N-tier application that is divided into discrete logical parts: user interface, business logic and data. In this model, processing is distributed between the client and the server, and business logic is captured in a middle tier. Tier (layer) Description This layer comprises the entire user experience. User interface Not only does this layer provide a graphical interface so that and navigation users can interact with the application, input data, and view -View the results of requests, it also manages the manipulation and formatting of data once the client receives it. The GUI will be a classic Windows interface implemented in VC. Business logic -Model -Controller Between the interface and data services layers, this layer is the domain of the application developer. Business logic, which captures the rules that govern application processing, connects the user at one end with the data at the other. The business rules mimic everyday business tasks, and can be a single task or a series of tasks. The business tier allows components to be written once and reused multiple times to serve multiple clients and purposes. The business tier is implemented by VC classes. Data services are provided by a structured data store, which manages and provides access to the application data. Data services are provided by MS Access database
Page 4
GUI
Controller
Main Engine
DB Helper DB_Museum
Page 5
Administrator Login
User
Museums Map Museums Items Collection Select an option *book *simulation *audio *computer
Museums Map Museums Items Collection Select an option *book *simulation *audio *computer
Search Page
Search Page
Update Page
Result on Page
Page 6
3.1 Prototype
To design a good interface we decided to create a first prototype that implements the main functions of the system. The prototype will help us to receive feedback from the customers and change in right of first stages of designing the GUI classes.
Page 7
4. Business Layer
4.1 Class Diagram
Page 8
4.2.1 Item
Create an item The administrator logs into the system The GUI creates an administrator controller The admin controller creates a session The session creates an item object based on the information provided by the administrator. This item is manipulated in this session At the end, the changes are committed to the DB by the session The item object is destroyed
Controller
Sess ion : Ses s ion
DBHelper : DBHelper
CreateItem(ID, ...)
Create Item which the Administrator accesses through all the layers after loging in. It enables him to create a new item.
Edit an Item Same operations as Creating an item The created session gets the data from DB for the corresponding item The session creates an item object based on that data This item is manipulated in this session At the end, the changes are committed to the DB by the commit command
Page 9
User Interface
Controller
Ses sion : Ses sion
DBHelper : DBHelper
Edit()
Exists(ID) Edit Item which only the Administrator can access through all the layers after loging in. It enables him to edit an item.
Delete an item Same operations as Editing an item The created session gets the data from DB for the corresponding item The session creates an item object based on that data This item is marked as deleted in this session At the end, the deletion is committed to the DB by the commit command to the corresponding item.
Controller
Session : Session
DBHelper : DBHelper
Delete Item which the Administrator accesses through all the layers after loging in. It enables him to delete an existing item.
Page 10
Committing to DB This command is used whenever the administrator or the system sees a need to apply the changes made to the DB. The command comes from the controller through the session and to the DB interface. Then, the interface is responsible to commit those changes physically.
Controller
MO_CItem : Ses s ion
DBHelper : DBHelper
Commit( )
The Confirmation Command to apply all performed changes to the DataBase. Used by Aministrator.
Searching DB It is used by all users to check or fetch items or any objects existing in the DB. The user asks for a search on a given string; this string could be an id, a type, a date, a part of the description, etc... All possibly needed search functions will be provided. After this command goes to the session, the session gets the information from the DB interface and returns a response or search results to the user through the controller and to his GUI.
Us er : General Us er
Search() Response() The Search option which the General User/Visitor can access to retreive items.
Page 11
4.2.2 Collection
Create a collection The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session creates a collection object based on the name provided by the admin This collection is manipulated in this session At the end, the changes are committed to the DB by the session The collection object is destroyed
UI
: D B Acce s s
createAdm in C n tl(pas s w o rd )
createS es s ion ( )
: Ses s ion
return(The C ollectio n) com m it('create', The colle ction ) des troy(The C olle ction )
Page 12
Update a collection The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session gets the data from DB for the collection to be updated The session creates a collection object based on the information got from the DB This collection is manipulated in this session At the end, the changes are committed to the DB by the session The collection object is destroyed
Administrator Login()
UI
: DBAccess
createSession()
Page 13
Delete a collection The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session gets the data from DB for the collection to be deleted The session creates a collection object based on the information got from the DB This collection is manipulated in this session At the end, the changes are committed to the DB by the session The collection object is destroyed
UI
: DBAcces s
createSession()
: Session getCollection(Name) return(The Collection) createCol lection('delete', Name) return(The Collection) The Collection : CO_CCollection
Page 14
4.2.3 Exhibition
Create an exhibition The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session creates an exhibition object based on the name provided by the admin This exhibition is manipulated in this session At the end, the changes are committed to the DB by the session The exhibition object is destroyed
UI
: DBAcces s
Page 15
Update an exhibition The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session gets the data from DB for the exhibition to be updated The session creates a collection object based on the information got from the DB This exhibition is manipulated in this session At the end, the changes are committed to the DB by the session The exhibition object is destroyed
Administrator Login()
UI
Admin : CO_CAdministrator
: DBAccess
Page 16
Delete an exhibition The administrator login into the system The GUI creates an administrator controller The admin controller creates a session The session gets the data from DB for the exhibition to be deleted The session creates an exhibition object based on the information got from the DB This collection is manipulated in this session At the end, the changes are committed to the DB by the session The exhibition object is destroyed
UI
: DBAc cess
createSes s ion()
: Ses s ion
getExhibition(Nam e) return(The Exhibition) create Exhibition('delete', Nam e) return(The Exhibition) The Exhibition : MO_CExhibition
Page 17
On D is play Start de s tr oy( ) create() Stored mak eOn Di spl ay( ) End
Figure. Collection
delete( )
Start create()
Norm al
ed it()
Edited
End
Figure. Item
Page 18
5. Persistence Layer
5.1 Database Assumption
Based on the previous requirement analysis and characteristics of the Museum Information System, we established some assumptions and constraints in order to develop an abstract description of the data to be stored in the database. These assumption and constraints are listed as follows: A collection is a set of zero or many item. Items can be added to a collection individually or following a rule. An item can be part of zero or many collections A collection can have zero or many items An exhibition is a set of collections that are on display. An exhibition can be composed by zero or many collections. A collection can be displayed in zero or many exhibition. An item which is on displayed has assigned only one room. A book can have one or many authors.
T_Simulation <<Identifying>> T_Item 1 PK_T_ItemCode() FK_T_RoomCode() 0..* 1 1 1 1 <<Identifying>> 1 <<Identifying>> <<Non-Identifying>> 1 T_Computer <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode() 1 <<Identifying>> 1 T_AudioVideo <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode() 1 <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode()
<<Non-Identifying>>
T_Room T_Book <<PK>> PK_T_RoomID() <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode() 0..* 1 <<Non-Identifying>>
T_ItemCollection <<FK>> FK_T_CollectionID() <<FK>> FK_T_ItemCollection25() <<Unique>> TC_T_ItemCodeCollectionID() 0..* <<Non-Identifying>> 1 T_Collection <<PK>> PK_T_CollectionID() 1 <<Non-Identifying>> 0..*
0..* T_BookAuthor <<FK>> FK_T_ItemCode() <<FK>> FK_T_PersonID() <<Unique>> TC_T_PersonIDItemCode() 0..* <<Non-Identifying>>
Page 20
T_Item COL_ItemCode : VARCHAR(20) COL_ItemName : VARCHAR(50) COL_ItemCreationData : DATETIME COL_ItemEntryDate : DATETIME COL_ItemOwner : VARCHAR(50) COL_ItemDescription : VARCHAR(500) COL_ItemType : VARCHAR(2) COL_ItemRegion : VARCHAR(50) COL_RoomCode : VARCHAR(10) <<PK>> PK_T_ItemCode() <<FK>> FK_T_RoomCode() 0..* 1 <<Non-Identifying>> 1 1
<<Identifying>> 1 1 <<Identifying>>
T_Simulation COL_SimultationOS : VARCHAR(50) COL_ItemCode : VARCHAR(20) COL_SimultationGoalDescription : VARCHAR(2000) 1 <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode()
1 1 <<Identifying>>
T_AudioVideo COL_AudioVideoLength : SMALLINT COL_AudioVideoFormat : VARCHAR(50) COL_ItemCode : VARCHAR(20) COL_AudioVideoDescription : VARCHAR(2000) <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode()
T_Computer <<Non-Identifying>> <<Identifying>> 1 COL_ItemCode : VARCHAR(20) COL_ComputerModel : VARCHAR(20) COL_ComputerCompanyName : VARCHAR(50) COL_ComputerHertz : SMALLINT COL_ComputerRAM : SMALLINT COL_ComputerMIPS : SMALLINT COL_ComputerDescription : VARCHAR(2000) <<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode()
T_Room COL_RoomCode : VARCHAR(10) COL_RoomName : VARCHAR(50) COL_RoomFloor : VARCHAR(10) COL_RoomDescription : VARCHAR(2000) COL_RoomSize : SMALLINT <<PK>> PK_T_RoomID() 0..*
T_ItemCollection COL_CollectionID : SMALLINT COL_ItemCode : VARCHAR(20) <<FK>> FK_T_CollectionID() <<FK>> FK_T_ItemCollection25() <<Unique>> TC_T_ItemCodeCollectionID() 0..* <<Non-Identifying>> 1 T_Collection COL_CollectionID : SMALLINT COL_CollectionDescription : VARCHAR(2000) COL_CollectionName : VARCHAR(100) <<PK>> PK_T_CollectionID() 1 <<Non-Identifying>> 0..*
<<PK>> PK_T_ItemCode() <<FK>> FK_T_ItemCode() 1 <<Non-Identifying>> 0..* T_BookAuthor COL_ItemCode : VARCHAR(20) COL_PersonID : VARCHAR(20) <<FK>> FK_T_ItemCode() <<FK>> FK_T_PersonID() <<Unique>> TC_T_PersonIDItemCode() 0..* <<Non-Identifying>> 1 T_Person COL_PersonID : VARCHAR(20) COL_PersonLastName : VARCHAR(50) COL_PersonBirthDate : DATETIME COL_PersonFirstName : VARCHAR(50) COL_PersonCurriculum : VARCHAR(2000) <<PK>> PK_T_PersonID()
T_ExhibitionCollection COL_CollectionID : SMALLINT COL_ExhibitionID : SMALLINT <<FK>> FK_T_CollectionID() <<FK>> FK_T_ExhibitionID() <<Unique>> TC_T_ExhibitionIDCollectionID() 0..* <<Non-Identifying>> 1 T_Exhibition COL_ExhibitionID : SMALLINT COL_ExhibitionStartDate : DATETIME COL_ExhibitionEndDate : DATETIME COL_ExhibitionDescription : VARCHAR(2000) COL_ExhibitionName : VARCHAR(100) <<PK>> PK_T_ExhibitionCode()
T_UserAccount
Page 21
KEY
NONCLUSTERED
UNIQUE
NONCLUSTERED
CREATE TABLE S_Museum.T_Collection ( COL_CollectionID SMALLINT NOT NULL, COL_CollectionDescription VARCHAR ( 2000 ), COL_CollectionName VARCHAR ( 100 ) NOT NULL, CONSTRAINT PK_T_CollectionID PRIMARY KEY (COL_CollectionID) )
NONCLUSTERED
COL_ExhibitionID SMALLINT NOT NULL, COL_ExhibitionStartDate DATETIME, COL_ExhibitionEndDate DATETIME, COL_ExhibitionDescription VARCHAR ( 2000 ), COL_ExhibitionName VARCHAR ( 100 ) NOT NULL, CONSTRAINT PK_T_ExhibitionCode PRIMARY (COL_ExhibitionID) )
KEY
NONCLUSTERED
A person can be: - an author of one/more books/software programs/audiovideo records/computers, - the owner/member of a company - the owner of an user account - the owner of an item CREATE TABLE S_Museum.T_Person ( COL_PersonID VARCHAR ( 20 ) NOT NULL, COL_PersonLastName VARCHAR ( 50 ) NOT NULL, COL_PersonBirthDate DATETIME, COL_PersonFirstName VARCHAR ( 50 ), COL_PersonCurriculum VARCHAR ( 2000 ), CONSTRAINT PK_T_PersonID PRIMARY KEY (COL_PersonID) )
NONCLUSTERED
Specific information about items of type book. This table can only be used together with the T_Item table. CREATE TABLE S_Museum.T_Book ( COL_ItemCode VARCHAR ( 20 ) NOT NULL, More detailed description of the book. COL_BookDescription VARCHAR ( 2000 ), COL_BookPublisher VARCHAR ( 50 ), CONSTRAINT PK_T_ItemCode PRIMARY KEY NONCLUSTERED (COL_ItemCode) ) Intermediate table: link a book to one or more authors (person/company) CREATE TABLE S_Museum.T_BookAuthor ( COL_ItemCode VARCHAR ( 20 ) NOT NULL, COL_PersonID VARCHAR ( 20 ) NOT NULL, CONSTRAINT TC_T_PersonIDItemCode UNIQUE NONCLUSTERED (COL_PersonID, COL_ItemCode) )
COL_ComputerCompanyName VARCHAR ( 50 ), COL_ComputerHertz SMALLINT, COL_ComputerRAM SMALLINT, COL_ComputerMIPS SMALLINT, COL_ComputerDescription VARCHAR ( 2000 ), CONSTRAINT PK_T_Computer20 PRIMARY (COL_ItemCode) )
KEY
NONCLUSTERED
CREATE TABLE S_Museum.T_Simulation ( Operating System name COL_SimultationOS VARCHAR ( 50 ), COL_ItemCode VARCHAR ( 20 ) NOT NULL, COL_SimultationGoalDescription VARCHAR ( 2000 ), CONSTRAINT PK_T_Simulation21 PRIMARY KEY (COL_ItemCode) ) CREATE TABLE S_Museum.T_AudioVideo ( Minutes/Seconds COL_AudioVideoLength SMALLINT NOT NULL, Name of the audio/video format. COL_AudioVideoFormat VARCHAR ( 50 ) NOT NULL, COL_ItemCode VARCHAR ( 20 ) NOT NULL, COL_AudioVideoDescription VARCHAR ( 2000 ), CONSTRAINT PK_T_AudioVideo22 PRIMARY KEY (COL_ItemCode) )
NONCLUSTERED
NONCLUSTERED
Table of items of the museum. This table contains common information about items, regardless of their type. Each specific item type has a separate table, linked by ItemCode field. CREATE TABLE S_Museum.T_Item ( COL_ItemCode VARCHAR ( 20 ) NOT NULL, COL_ItemName VARCHAR ( 50 ) NOT NULL, The day the item was pubblicized COL_ItemCreationData DATETIME NOT NULL, The day the museum acquired or received the item. COL_ItemEntryDate DATETIME NOT NULL, Owner name. The owner can be a person, a group of people, or a company (including the museum itself). There is also a separate reference field to the owner table. COL_ItemOwner VARCHAR ( 50 ) NOT NULL, Short description of the item. A more complete description can be found in the specific item tables. COL_ItemDescription VARCHAR ( 500 ) NOT NULL, BK - Books SW - Software CM - Computers Page 24
AV - Audio Video COL_ItemType VARCHAR ( 2 ) NOT NULL, COL_ItemRegion VARCHAR ( 50 ) NOT NULL, COL_RoomCode VARCHAR ( 10 ) NOT NULL, CONSTRAINT PK_T_Item23 PRIMARY KEY NONCLUSTERED (COL_ItemCode) ) ALTER TABLE S_Museum.T_ExhibitionCollection ADD CONSTRAINT FK_T_CollectionID FOREIGN KEY (COL_CollectionID) REFERENCES S_Museum.T_Collection (COL_CollectionID) ALTER TABLE S_Museum.T_ExhibitionCollection ADD FK_T_ExhibitionID FOREIGN KEY (COL_ExhibitionID) S_Museum.T_Exhibition (COL_ExhibitionID) ALTER TABLE S_Museum.T_ItemCollection ADD TC_T_ItemCollection212 FOREIGN KEY (COL_CollectionID) S_Museum.T_Collection (COL_CollectionID) ALTER TABLE S_Museum.T_ItemCollection ADD FK_T_ItemCollection25 FOREIGN KEY (COL_ItemCode) S_Museum.T_Item (COL_ItemCode) CONSTRAINT REFERENCES CONSTRAINT REFERENCES CONSTRAINT REFERENCES
ALTER TABLE S_Museum.T_Book ADD CONSTRAINT FK_T_ItemCode FOREIGN KEY (COL_ItemCode) REFERENCES S_Museum.T_Item (COL_ItemCode) ALTER TABLE S_Museum.T_BookAuthor ADD CONSTRAINT TC_T_BookAuthor213 FOREIGN KEY (COL_ItemCode) REFERENCES S_Museum.T_Book (COL_ItemCode) ALTER TABLE S_Museum.T_BookAuthor ADD CONSTRAINT FK_T_PersonID FOREIGN KEY (COL_PersonID) REFERENCES S_Museum.T_Person (COL_PersonID) ALTER TABLE S_Museum.T_Computer ADD CONSTRAINT TC_T_Computer214 FOREIGN KEY (COL_ItemCode) REFERENCES S_Museum.T_Item (COL_ItemCode) ALTER TABLE S_Museum.T_Simulation ADD CONSTRAINT TC_T_Simulation215 FOREIGN KEY (COL_ItemCode) REFERENCES S_Museum.T_Item (COL_ItemCode) ALTER TABLE S_Museum.T_AudioVideo ADD CONSTRAINT TC_T_AudioVideo216 FOREIGN KEY (COL_ItemCode) REFERENCES S_Museum.T_Item (COL_ItemCode) ALTER TABLE S_Museum.T_Item ADD CONSTRAINT FK_T_RoomCode FOREIGN KEY (COL_RoomCode) REFERENCES S_Museum.T_Room (COL_RoomCode)
Page 25