Presentation is loading. Please wait.

Presentation is loading. Please wait.

Databases. MRM Website Real World DATABASE A data model is a methodology for storing and retrieving data.

Similar presentations

Presentation on theme: "Databases. MRM Website Real World DATABASE A data model is a methodology for storing and retrieving data."— Presentation transcript:

1 Databases

2 MRM Website

3 Real World DATABASE A data model is a methodology for storing and retrieving data

4 Real World (GIS) DATABASE

5 Databases Definition A database is structured collection of data. Card indices, printed catalogues of archaeological artefacts and telephone directories are all examples of databases Your Christmas card list is a database, as is your address book!!! Databases may be stored on a computer and examined using a program called `a database management systems (DBMS)

6 Databases Software DBASE MS-Access ORACLE FoxPro Paradox ClarisWorks Many others besides Industry Standards

7 Databases Database (Storage) Database Management System (DBMS) Tables (e.g. attributes) Fields Records

8 Databases RecordsField If a spatial database (such as a GIS) then two additional fields for X,Y co-ordinates (Northings (N) and Eastings (E) OR Latitude and Longitude Attributes

9 Databases Data Fields Numbers, Characters (strings), Alphanumeric Date, Name, Formatting & Calculation Data Records Functionality: Sorting, Selection, Query

10 Databases Flat File Hierarchical Network Relational Object-Oriented (OO)

11 Flat-File Databases One large table of data Good example is a Spreadsheet Ideal for small amounts of data that needs to be human readable or edited by hand Good for storing simple lists and data values Complicated for more complex data structures and can be more costly in time and processing power compared to a relational database; methods for storing more complex data types can make the file unreadable and un-editable to anyone looking after the database Database is usually split up using a common delimiter e.g. comma Very prone to corruption Flat-files can be combined to emulate some of the behaviour of a relational database but slow in practice For small amounts of data, rarely updated, relational database solution is overkill

12 Flat-File Databases Field Record Spatial co-ordinates Attributes

13 Hierarchical Databases Data organised at different levels One-to-Many Association In a hierarchical database (HDBMS) have a strictly defined tree of data nodes Each node can contain some identifying data, plus a set of subnodes of a specific child type The number of subnodes can vary between sibling nodes at the same level, but the type of all "cousins" is identical In hierarchical databases, data access is utterly predictable in structure; therefore both retrieval and updates can be highly optimized by a DBMS.

14 Databases One-to-One Relationship: When one record in a table relates to only one record in another table and vice versa One-to-Many Relationship: When one record in one table relates to many records in another

15 Databases One to One

16 Databases One to Many

17 Databases One-to-many

18 Databases One-to-many

19 Databases Many to Many

20 Hierarchical Databases

21 Relational Databases The relational database was invented by E. F. Codd at IBM in 1970 Collection of Tables or Relations Connected by keys One or more fields or attributes that uniquely identify a record in a table Connects the tables Tables can be used to represent real world objects, with each field acting like an attribute Relations can be quite complex in nature, and are hard to replicate in the standard flat-file format Relational databases also have functions "built in" that help them to retrieve, sort and edit the data in many different ways The standard user and application program interface to a relational database is the structured query language (SQL) SQL statements are used both for interactive queries for information from a relational database and for gathering data for reports

22 Relational Databases


24 As well as having primary keys, tables typically have some secondary keys The secondary keys correspond with primary keys in other tables The BOOKS table has secondary keys AuthorID and PubID. These, in turn, serve as primary keys for the AUTHORS and PUBLISHERS tables The idea here is that every BOOKS row has a distinct ISBN value, each AUTHORS a unique AuthorID, and each PUBLISHERS a unique PubID Any relational database package normally uses an index of some sort for faster access to the data

25 Relational Databases Record Tools Record Selection Field Field Selection Table

26 Advantages/Disadvantages Advantages: Easy to set up Easy to understand Disadvantages: May require entering the same information in many records. A text database is hard to read. A single record in a spreadsheet database may not fit across the screen. FLATFILE

27 Advantages/Disadvantages Advantages: Reduces the duplication in data entry. Faster searches. Can create forms and reports that display only the data you want to see. Can create queries to answer questions that are hard or impossible to answer in flat databases. Disadvantages: Can be complex to set up, using many tables. It is harder to understand how all the parts relate to each other. RELATIONAL

28 Data Models Setting up a Database usually requires considerable planning Fields and attributes Data Models A data model is a "description" of both a container for data and a methodology for storing and retrieving data from that container. Data models are abstractions e.g. mathematical algorithms and concepts. Provide a clear plan of what will be collected: e.g. number, text etc.. Useful EXAMPLE: ESRI ArcGIS Marine Data Model

29 Data Models

30 SDIs etc… Access to data (particularly online) requires: Spatial Data Infrastructures (SDIs) Data Quality Standards (e.g. ISO) for Data Formats, Data Models Metadata (information about data/information)

31 Database Tutorial MS-Access Download from Link on website - Task Requirement – Answer the Questions on the Question Sheet (also on website)

32 ArcMarine: The ArcGIS Marine Data Model for the oceans, seas, and coastal regions of our planet... Task: find, download and read the paper – Chapter in Marine Geography by J. Breman, D. Wright, P. Halpin The Inception of the ArcGIS Marine Data Model

33 Find Out More Use Google to search for information One good example is:

Download ppt "Databases. MRM Website Real World DATABASE A data model is a methodology for storing and retrieving data."

Similar presentations

Ads by Google