Introduction to Database for Geographic Sciences GEOM 4070 3/26/2014
This technical report was compiled by Bronwyn Fleet-Pardy. It was written by Bronwyn Fleet-Pardy, Thomas Herbreteau, Celene Palmer, Vanessa Campbell and Ariel Vallis. This product is unedited, unverified and intended for educational purposes only. COGS 2014 Graduate Alumni Database March 26, 2014
Page i
Table of Contents Introduction ............................................................................................................................ 1 Theories ................................................................................................................................. 2 Schema .............................................................................................................................. 2 Entity Relationship Diagram ERD ....................................................................................... 2 Relationships ....................................................................................................................... 3 Research ................................................................................................................................ 5 Serving Databases on the Internet (Web) .............................................................................. 5 Forms ................................................................................................................................. 5 Methodologies ....................................................................................................................... 7 Quality Control ...................................................................................................................... 9 Testing Queries ................................................................................................................... 9 Conclusion ........................................................................................................................... 10 Recommendations ............................................................................................................. 10 Works Cited ........................................................................................................................... a
Graduate Alumni Database March 26, 2014
Page 1
Introduction Written by Bronwyn Fleet-Pardy The Graduate Alumni Database was collaboratively produced by: Bronwyn Fleet-Pardy, Thomas Herbreteau, Celene Palmer, Vanessa Campbell and Ariel Vallis. The group database project encompassed many components as delineated in this technical document. The main goal of the project was to work together to complete a database that could be applied to the real world. They could improve their existing abilities as well as learn new skills. All of the capabilities the group members have developed will help ensure their feature successes in the geomatics industry.
Graduate Alumni Database March 26, 2014
Page 2
Theories Schema Written by Vanessa Campbell The relationship schema provides a written formal language of the structure of the database. It includes the Primary Key(s) (bold), Fields, and Foreign Key(s) (italics). An example used for this database is provided below. ASSOCIATION (ASSOC_ID, AFFILIATION, MEMBERSHIP, GID) Entity Relationship Diagram ERD Written by Ariel Vallis The entity relationship diagram (ERD) was created collaboratively using Microsoft Visio 2010. The importance in creating the ERD was to model the data and relationships that would participate in the Graduate Alumni Database. Building the ERD helped establish related data into entities. These entities would eventually function in a database as tables suitable for queries and analysis. As stated, the ERD was built collaboratively, in several group work sessions, in which the group members shared their ideas about which information was important to this database. Some of these ideas came from online resources, examples of alumni pages and other databases. One online example of an ERD was relating to a students capstone project and was used as an example to see how the data between students and a project were related. While coming up with ideas for themes and data to populate entities in the ERD, the group was also considering what information could be used to link the entities together. When satisfied with the ERD, it had 8 entities. The 8 entities are as follows: Personal Contact Education Association Company Graduate Alumni Database March 26, 2014
Page 3
Company address Salary Past Employment Considering this is a Graduate Alumni Database, these entities are important, and successful in containing all of the relevant information necessary for keeping up with the graduates. Part of constructing the ERD also involved deciding as a group what data is more important for the database. After some consultation and consideration, it was decided that the Salary entity would exist in the ERD, though is optional to fill out. While it is beneficial to the database, it is not mandatory for graduates to provide the information. This was a respectable balance for entities, and a suitable decision making process as a group. Relationships Written by Ariel Vallis It was determined that a graduate identifier (GID) attribute was necessary to identify the graduates. GID ended up being the important Primary Key that would identify the graduate(s) and link information to any specific graduate in the various tables. For example, GID is the Primary Key in the Personal table and the Primary Key (while also representing the Foreign Key) in the Contact information table. This is an identifying relationship that relates information like the graduates first and last name in the Personal table, to their phone and email information in the Contact table. This is important for maintaining contact material. Employment is important and relevant to this database, so it was important to relate any company attributes to the graduates. The purpose of these elements being related in the ERD is so that people using the database can stay up to date with graduates, their companies and job locations. The Company entity in the database contains attributes like: Company Name (CName) Company Website (CWebsite) Graduates Position (Position) Job Start Date (StartDate) Software Description (SoftwareDesc) Graduate Alumni Database March 26, 2014
Page 4
The Company identifier (CID) was used as a Primary Key in that entity. CID was used to link the Company with the Company Address entity in a non-identifying relationship. It is important to note that the address can be either national or international. The Company Address entity encompasses: Unit Number (CUnitNum or CUnitNo) Street Number (CStreetNum or CStreetNo) Street (CStreet) City (CCity) Province (CProv) Country (CCountry) Postal Code (CPostCode) Linking the company information to the GID is important for this database to function. GID exists as a Foreign Key in the other entities as well. In the Association table for example, there is an association identifier attribute (AssocID), as well as affiliation and membership attributes. It is good to know about the graduate and which associations they are a part of. GID is the Foreign Key that is linked to this information. There is a non-identifying relationship. In a larger database with more information and records, keys and relationship cardinality rules would be as equally important in maintaining integrity within the database.
Graduate Alumni Database March 26, 2014
Page 5
Research Serving Databases on the Internet (Web) Written by Thomas Herbreteau Having a database on the cloud is increasingly an easier solution as the appropriate technology becomes more and more performant and mainstream. There are multiple ways to serve a database on the internet and the cloud it all comes down to the users needs and resources. First, to explore the Microsoft SharePoint solution: Just like Access, Word, Excel, etc., SharePoint is a product from Microsoft. Launched 13 years ago, SharePoint is now capable of a multitude of tasks and applications all related to the content and document management, social networks, intranet portals, websites, etc. In our case, SharePoint can take a database from Access and upload it on a given network, or the cloud. Anyone on that very network can then update the database, granted they have access to it. Of course, there are multiple other ways to serve a database on the internet. A quick example could be CartoDB. The site has the ability to upload data and visualize it. Another example: MySQL. It is believed to be the worlds second most widely used open-source Relational Database Management System (RDBMS). Simply put, it is a database system used by many major websites (Google, Amazon, Apple) and has the ability to be compatible with many major programming languages, the most common one being PHP. The last example, PostgreSQL, is very similar to MySQL but slightly older, slightly more performant and is open-source as well. Forms Written by Celene Palmer Using input forms within Access is a structured way to input data within Access. Instead of entering data into a spreadsheet or text file and importing it into Access, a form is more user friendly. Some great resources to learn about forms within Access can be found here. Explanations of why to use a form and how to create forms using different ways can be found here.
Graduate Alumni Database March 26, 2014
Page 6
The different kinds of forms offered in Access are as follows: Detail Form One side of the relationship. Creates a "parent forms first", Access can generate this. Split Form Is a combination of a detail form and data sheet. Viewing large amounts of data but only changing errors within one entry. Sub Form Looks like a split form. Only used with relational data. It allows the data to be changed on both sides of the relationship. A detail form is the "parent" entity and the data sheet view is the "child" entity of the relationship. Multiple Items Form Looks like a data sheet. Gives control over text, size of columns and rows as well as the ability to add control buttons. Navigation Form Top or side tab. Opens forms and allows the user to drag and drop fields to the form. The internet database(s) only allows certain kinds of forms. A list of unaccepted forms can be found under the tab "Client Forms" in the link above. Simply do not add that kind to a database on the internet.
Each group member learned how to create at least one form using the data tables contained inside the Access database and how to add a pull down menu with options. This method will ease the process of data entry for the next user.
Graduate Alumni Database March 26, 2014
Page 7
Methodologies Written by Vanessa Campbell This portion of the report reviews the principle methods encountered throughout this project. This section acts as a breakdown of the procedures to provide readers or users with an organized and clear perception of the projects design. 1. An important procedure for any project is to brainstorm and research the topic in question. If the project is a wide-range subject with many technical elements, the first order is choosing a team leader who can delegate the tasks, organizing meetings and deadlines. The research started by searching current Alumni Database structures, entity tables, relationships types, and queries that are unique to the database. 2. To begin building a database, the group members decided having an organized database is a key component to generating a high quality database(s). There are different types of models that can be used as a guide for building the database. The models include in this project are Entity Relationship Diagram (ERD) and Relationship Schema (RS). The ERD provides a pictorial overview of the entity tables, fields, keys, and relationships. The relationship schema provides a written formal language of the structure of the database including the Primary Key(s) (bold), Fields, and Foreign Key(s) (italics). The ERD and RS is created using Microsoft Visio 2010 (MS Visio). MS Visio enables the user(s) the ability to create conceptual models for database design. The tools used in MS Visio to create the ERD included entity tables, field types, field properties, keys and relationships. The cardinality between the individual tables is a one-one relationship with the parent tables being Personal and Company. The Personal table forms identifying relationships with the Contact, Education, and Company tables. The Personal table forms non-identifying relationships with the Salary, Association, and Past Employment. The Company table forms a non-identifying relationship with Company Address. 3. Once the plan of action (ERD, RS) is created, the flow for generating a database becomes more fluent. The Graduate Alumni Database created for this project used Microsoft Access 2010 (MS Access). The models from the previous step are the base for the database design. In MS Graduate Alumni Database March 26, 2014
Page 8
Access, the user can click on the Create tab to display the ribbons for database design. In the create tab the ribbon Table is used to generate the tables (or entities) for the database. There were 8 tables created: Personal, Contact, Education, Past Employment, Association, Company, Company Address, and Salary. MS Access is more efficient when there is 8 tables or less. The table design view allows the user to add the field name, data type, description and field properties for the individual tables. Once the tables and fields are finished, the user can create forms (discussed in the next step) to populate the field. Tables with the individuals information, can be manual inserted or can be creating in a text (.txt) file. The text files can be imported into MS Access under the External Data tab and appended to the unique table. 4. Forms are a tool available in Access that is an alternative way of populating the fields with information. The generated forms use the field name and allow the user to input the information to the pertaining to the field. 5. Building relationships are required to link the user(s) tables together to provide associations with the other tables. The relationships for this project are linked together by their Primary Keys in a one-one relationship. The form and relationships tables all must be closed. The relationship tool is located under the Database Tools tab. The relationships are created by highlighting the Primary Key for the parent table and dragging it to the Primary Key of the child table. This is to be completed until all tables are linked to the parent table. 6. Queries work to manipulate the data in a way to acquire the information needed. MS Access provides different options in the design and building process of querying. The query design lets the user add the table(s) to the design view that will be used in the query statement. The alternative is building query statements in the SQL view. For quick tips and examples on the structure of queries, visit the w3schools website found here.
Graduate Alumni Database March 26, 2014
Page 9
Quality Control Written by Thomas Herbreteau Because there were 5 members in the group, quality control was a stress-free task. Either the group members made sure there were no mistakes when working as a group or the group members would see each others work during a group meeting and point out the possible mistakes. It was also very important to confirm the work met the requirements; so the group made sure to check with the instructor to determine if the group was on the right track. The group worked well as a team to make sure they were delivering the best product possible from the task delegation to the documentation. Like mentioned above, everyone monitored each others work, to a certain extent. The group ended up with a functioning database composed of 8 tables filled with relevant information, and made sure everyone had the same functioning database. All in all, quality control was an ongoing and essential task for the group. Testing Queries Written by Celene Palmer When a sufficient amount of data has been obtained within the database, it can be very useful to test the data by performing queries. It can be executed using a programming language such as Structured Query Language (SQL). Using SQL allows the user to communicate with the database by easily displaying and manipulating the data. By creating a selection on certain attributes of interest, the user can view only the selected information within a specific entity. Since the SQL process in Access is still new to the group members, they were fortunate enough to have the help from w3schools, which can be found here. Within the website, the group could view and try different queries to help understand what each one is capable of. Each group member created at least one SQL of their own to share with the group. Working as a team really helped as the group could discuss why they thought something did or did not work. It was very interesting to look into why some queries worked for some but not others; as a group everyone worked through this issue so all queries worked.
Graduate Alumni Database March 26, 2014
Page 10
Conclusion Written by Bronwyn Fleet-Pardy Overall, the group members were successful in generating a functioning Graduate Alumni Database. Each group member has learned new skills and improved already exiting abilities with regards to working as a team member, creating databases, utilizing software and programming language(s). Much of the data encompassed in the database was normalized to ensure data integrity and to simplify the database for the course learning outcomes. The group members are all capable of applying fundamental database design to produce a professional database for geographic associated data. They can manipulate data using Structured Query Language (SQL) along with normalizing data and describing the processes involved with the creation of databases. They have also improved their communication and adaptability in a group setting as well as working with superiors. Recommendations Written by Bronwyn Fleet-Pardy Future recommendations would be as follows: In the Past Employment entity, there could be more than one prior position for a graduate, it would be good to include additional past employment positions to account for more than one previous job. When creating forms in the database it could be better to create the form before populating the database with information. This could help with data integrity, especially if pull down menus were implemented. An example of this would be: In the Personal entity, a pull down option would be used for Salutations (Mr, Mrs, Miss and Ms) and Gender (M Male, F Female, O Other). To keep the database simple, the group only chose 8 entities. However in the beginning there were many more tables for graduate information. If the database were to be implemented to actually function as a Graduate Alumni Database for the Centre of Geographic Sciences (COGS), it could include more entities, attributes and linking tables to provide COGS with more graduate information. Graduate Alumni Database March 26, 2014
Page a
Works Cited Office, M. (2014). Training courses for Access 2013. Retrieved March 18, 2014, from Microsoft Office: http://office.microsoft.com/en-ca/access-help/training-courses-for-access-2013- HA104030993.aspx?CTT=5&origin=VA104138901 w3schools, & Data, R. (2014). SQL Tutorial. Retrieved February 26, 2014, from w3schools.com: http://www.w3schools.com/sql/default.asp