0% found this document useful (0 votes)
30 views12 pages

Database Design Document LocADoc

The document summarizes the database design for the LocAdoc application. It describes a NoSQL database using DynamoDB with elements for users, passwords, files, and areas. It also describes a relational SQLite database with tables for areas, files, and users to store related data and define relationships between elements. Finally, it provides object diagrams, data dictionaries, and explanations of the purpose of each database component.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views12 pages

Database Design Document LocADoc

The document summarizes the database design for the LocAdoc application. It describes a NoSQL database using DynamoDB with elements for users, passwords, files, and areas. It also describes a relational SQLite database with tables for areas, files, and users to store related data and define relationships between elements. Finally, it provides object diagrams, data dictionaries, and explanations of the purpose of each database component.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Database Design Document (DDD) for LocAdoc

LocAdoc
Database Design Document (DDD)

Version 2.0

Prepared by: Abhi Jay Krishnan


Kim Hyeocheol
Rivaldo Erawan
Durrah Afshan
Database Design Document (DDD) for LocAdoc

Revision History
Date Version Description Author

27/09/2017 2.0 Made modification to the structure of both NoSQL Abhi Jay Krishan
database and SQLite database.
Database Design Document (DDD) for LocAdoc

Table of Contents
1 INTRODUCTION ........................................................................................................................................1
1.1 DOCUMENT OBJECTIVES ......................................................................................................................... 1
1.2 INTENDED AUDIENCES ............................................................................................................................ 1
1.3 REFERENCES ........................................................................................................................................... 1

2 DETAILED DATABASE DESIGN ............................................................................................................2


2.1 DYNAMODB DESIGN (NOSQL DATABASE) ............................................................................................. 2
2.1.1 Object Diagram ...............................................................................................................................3
2.1.2 Data dictionary ...............................................................................................................................4
2.1.2.1 Data dictionary for Element: User.................................................................................................................... 4
2.1.2.2 Data dictionary for Element: Password ............................................................................................................ 4
2.1.2.3 Data dictionary for Element: File ..................................................................................................................... 4
2.1.2.4 Data dictionary for Element: Area ................................................................................................................... 5
2.2 SQLITE DATABASE DESIGN (RELATIONAL DATABASE) ........................................................................... 6
2.2.1 Conceptual diagram ........................................................................................................................6
2.2.2 Description ......................................................................................................................................6
2.2.3 Purpose of Tables ............................................................................................................................6
2.2.3.1 Purpose of Area Table ...................................................................................................................................... 6
2.2.3.2 Purpose of File Table ....................................................................................................................................... 7
2.2.3.3 Purpose of User Table ...................................................................................................................................... 7
2.2.4 Relations..........................................................................................................................................7

3 REFERENCES .............................................................................................................................................7

4 APPENDIX 1 – XML SCHEMA.................................................................................................................8


Database Design Document (DDD) for LocAdoc

1 Introduction
The section introduces the Database Design Document (DDD) for LocAdoc to its readers.

1.1 Document Objectives


This DDD for the LocAdoc software has the following objectives:
• Describe the design of a DynamoDB and SQLite database, that is, a collection of related data stored
in one or more computerized files in a manner that can be accessed by users or computer programs
via a database management system (DBMS). It can also describe the software units used to access
or manipulate the data.
• To serve as the basis for implementing the database. It provides the acquirer visibility into the
design and provides information needed for software support.

1.2 Intended Audiences


This DDD is intended for the following audiences:
• Technical reviewers, Supervisor and UOW staff who must evaluate the quality of this document.
• LocAdoc developers including:
Architects, whose overall architecture must meet the requirements specified in this document.
Designers, whose design must meet the requirements specified in this document.
Programmers, whose software must implement the requirements specified in this document.
Testers, whose test cases must validate the requirements specified in this document.

1.3 References
This DDD refers to the following references:
• Software requirement specification: SRS_LocAdoc.docx
• Project Proposal: Project_Proposal_SS173D_V1.docx

1|Page
Database Design Document (DDD) for LocAdoc

2 Detailed Database Design


This section describes the actual design of different databases at varying levels of abstraction. A subsection
for each of conceptual, internal, logical and physical levels.

2.1 DynamoDB design (NoSQL database)

Figure 1: Database design

2|Page
Database Design Document (DDD) for LocAdoc

The diagram given above visualize the NoSQL database. This design was developed after creating a XML
schema (Appendix 1) and using an online converter. [2]
The user element will hold all the user details which be mapped to there to his password and files. He will
also have an option to set an user administration area.

2.1.1 Object Diagram


Here is an object diagram to show a given instance of the database.

This object diagram shows a sample data set and their relationships with other objects. For the propose of
the object please refer to the section 2.2.3.

3|Page
Database Design Document (DDD) for LocAdoc

2.1.2 Data dictionary


2.1.2.1 Data dictionary for Element: User
Name Data Type Constrain Description

Email ID (primary key) string Min :1, Max:1 Email ID of the user
Name String Name of the user
Password (Foreign Key) Integer Min :1, Max:1 The password of the user
LogedIn String Used to flag if the person is
currently logged in a
devise. So the second login
can be detected.
InstanceID String Stores the application
installation instance.

AdminArea Integer User has the freedom to set


the admin area.

2.1.2.2 Data dictionary for Element: Password


Name Data Type Constrain Description

Password ID (primary Integer Min :1, Max:1 ID to identify the


key) password
Password String Hashed Password
Salt String Salt to prevent repeated
keys being generated for
encryption due to similar
password.

2.1.2.3 Data dictionary for Element: File


Name Data Type Constrain Description

FileID (primary key) Integer


CurrentFileName string Min :1, Max:1 A new name for the file
assigned by the
application
OriginalFileName String The original file name
assigned by user.

4|Page
Database Design Document (DDD) for LocAdoc

BackedUP Boolean This a variable to make


sure if the data has been
backed up or new.
Password Integer Password that was used to
encrypt the file (password
ID)
Area Integer The area where the file
has been grouped in (Area
ID)

2.1.2.4 Data dictionary for Element: Area


Name Data Constrain Description
Type
Area ID (primary key) string Min :1, Max:1 ID to identify the area
AreaName string Stores the name of the
area given by the user.
Description string Stores the description
created by the user for the
area.
Longitude Decimal The Longitude of the first
file that was created in this
area
Latitude Decimal The Latitude of the first
file that was created in this
area.
Radius Decimal The radius around the
point where the first file
was created.

5|Page
Database Design Document (DDD) for LocAdoc

2.2 SQLite database design (Relational database)

2.2.1 Conceptual diagram

2.2.2 Description
This diagram displays the conceptual model of the SQLite database. This database will be created after the
it has imported the user’s data. The user session will have the user’s details who is currently logged in. The
user will have a password and an admin area where he can make changes to his account such as changing
password (optional up to user to set it up). Each user will have zero or more files. The local database will
only hold the Area and file information. All the data other than the primary and foreign keys will be stored
after encryption using user’s password. The database contents will be decrypted when user makes request.

2.2.3 Purpose of Tables

2.2.3.1 Purpose of Area Table


This table stores the information regarding the Area a file was created. The radius is the area around that
point where the files grouped in that area can be accessed. The longitudinal and latitudinal value is used to
encrypt the file in that area.

6|Page
Database Design Document (DDD) for LocAdoc

2.2.3.2 Purpose of File Table


This table stores all the information regarding a file used by the user. When the file is imported into the
application, a new file name is generated and it is mapped with the actual table. The longitude and the
latitude of the location where the file was created is also stored. The file will also will have a password
which was used to encrypt the file.

2.2.3.3 Purpose of User Table


The user stores the details of the user currently logged into the system. The user will have a password and
an admin area where he can make changes to the account. The primary key of the table will be the email
ID. This table will only one record as the database only belongs to one user.

2.2.4 Relations
From Table To Table Relation
User Area A user may set an admin area.
Files Area A file belongs to an area.
User File A user may saved more than one
file.
File Password A file will be encrypted using a
password.
User Password A user has a password.

3 References

[1] "Visual BSD," [Online]. Available: http://visualxsd.com/.

[2] "Amazone DynamoDB," Amazone, [Online]. Available: https://aws.amazon.com/dynamodb/.

7|Page
Database Design Document (DDD) for LocAdoc

4 Appendix 1 – XML Schema


This XML schema was created to check if the schema was well formed.

<?xml version="1.0" encoding="UTF-8"?>


<!-- Created with Liquid Studio 2017 - Community Edition 15.1.9.7584 (https://www.liquid-technologies.com) -->
<!-- created with XMLSpear -->
<xsd:schema elementFormDefault="qualified" targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="User">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EmailID" type="xsd:string"/>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Password" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PasswordID" type="xsd:string"/>
<xsd:element name="pwd" type="xsd:string"/>
<xsd:element name="salt" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:key name="PK_Password">
<xsd:selector xpath="User/Password"/>
<xsd:field xpath="PasswordID"/>
</xsd:key>
</xsd:element>
<xsd:element name="MacAddress" type="xsd:string"/>
<xsd:element name="LogedIn" type="xsd:boolean"/>
<xsd:element name="Area">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AreaID" type="xsd:integer"/>
<xsd:element name="AreaName" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Longitude" type="xsd:string"/>
<xsd:element name="Latitude" type="xsd:string"/>
<xsd:element name="Radius" type="xsd:string"/>
<xsd:element name="File">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FileID" type="xsd:integer"/>
<xsd:element name="CurrentFileName" type="xsd:string" maxOccurs="1"/>
<xsd:element name="OriginalFileName" type="xsd:string" maxOccurs="1"/>
<xsd:element name="BackedUp" type="xsd:string"/>
<xsd:element name="Password">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PasswordID" type="xsd:integer"/>
<xsd:element name="pwd" type="xsd:string"/>
<xsd:element name="salt" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

8|Page
Database Design Document (DDD) for LocAdoc

<xsd:key name="PK_File">
<xsd:selector xpath="User/File"/>
<xsd:field xpath="CurrentFileName"/>
</xsd:key>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:key name="PK_AREA">
<xsd:selector xpath="User/File/Area"/>
<xsd:field xpath="AreaID"/>
</xsd:key>

</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:key name="PK_USER">
<xsd:selector xpath="User"/>
<xsd:field xpath="EmailID"/>
</xsd:key>
</xsd:element>
</xsd:schema>

9|Page

You might also like