mgis 301 databases and database technologies

Download MGIS 301 Databases and Database Technologies

Post on 12-Apr-2017




0 download

Embed Size (px)


MGIS 301 Management Information Systems

MGIS 301 Management Information SystemsWeek 04Databases and Database Technologies M. Murat Albayrakoglu

Agenda Transferable skill Database concepts Database design Database management system (DBMS)11/17/2016MGIS 301 Management Information Systems2

Transferable SkillsAny skill that applies to various roles and tasks throughout an individuals careerCan be acquired via various activitiesInformalFormalCategories Communication skills Analytical skills Technical skills Personal skills Organizational skills

Database skills = Knowledge + Practice11/17/2016MGIS 301 Management Information Systems3

Database Concepts

11/17/2016MGIS 301 Management Information Systems4

BasicsBit (b): 0 or 1 Byte (B): 8 bits; size of each ASCII characterData storage needs measured in kB=103BMB=106BGB=109BTB=1012BPB=1015BEB=1018BZB=1021B

11/17/2016MGIS 301 Management Information Systems5

Database DefinitionA database is an organized collection of related data A database has a purpose has users has structure describes a relevant part of the real world 11/17/2016MGIS 301 Management Information Systems6

Database AdvantagesProgram-data independence Data changes without changing programs New programs can use existing data Planned data redundancyLimited replication of data Storage space efficiency Improved data consistencyReduced chance for data inconsistency Improved data sharing Authorized users User view specific to a task Increased productivity of application developmentFocus on accessing data rather than creating and updating dataFocus on functionality

11/17/2016MGIS 301 Management Information Systems7

Database Advantages (cont.)Enforcement of standardsSingle authority to enforce data standards: DBA Improved data qualityEntry and modification constraints Integrity constraints Improved data accessibility and responsivenessEasy to get data from within the authorized user viewsReduced program maintenanceNo impact of data changes on the programs to a certain limit Improved decision supportFast access to high quality data Faster and more accurate decisions

11/17/2016MGIS 301 Management Information Systems8

Database DisadvantagesNew IT specialists Database developers and administrators Installation and maintenance costs Getting, operating and maintaining multi-user systems Apparent complexityUser, developer and administrator training Conversion costs Changing from legacy systems to a database environment Security and continuity risksBackup and recovery issues Organizational conflictsData definition, ownership, and maintenance rights 11/17/2016MGIS 301 Management Information Systems9

Database ModelsPre-Relational and Relational ModelsFlat file model Hierarchical database model Network database model Relational database model (in this course) Object-relational database model Post-Relational Models (after Web 2.0)Object database model Column-based database model Key-value database model Document-based database model Graph database model Hybrid database models 11/17/2016MGIS 301 Management Information Systems10

Relational Database Model History Edgar F. Codd proposed the model in 1970Based on the concepts of relational algebra First commercial implementation in 1979 Oracles SQL RDBMS

Major players today Proprietary IBM DB2Microsoft Access Microsoft SQL Server OracleOpen source MySQLPostGRE SQL SQLite11/17/2016MGIS 301 Management Information Systems11

Relations Relation (Table) Named and two-dimensional table, e.g. INSTRUCTOR Contains columns e.g. instructorID, instructorName, lastName, academicTitle, dateEmployedContains data, e.g. 555551, Mehmet Murat, Albayrakoglu, Instructor, 15/09/2016in its rowsAttribute (Field)Each named column of a relation, e.g. instructorName, lastName, academicTitle Of a particular data type, e.g. text, integer, decimal, date, hyperlink, Boolean, date etc. Tuple (Record) Each unnamed row of a relation Made up of data cells

11/17/2016MGIS 301 Management Information Systems12

Example: A Table11/17/2016MGIS 301 Management Information Systems13

KeysPrimary key An attribute (or combination of attributes) whose value is unique across all occurrences of a relatione.g. studentID, citizenshipNo, productID. Composite key An attribute that has meaningful components e.g. studentID = 20150112007 is made up of admissionYear = 2015 collegeID = 01 departmentID =12 registrationNo = 007Foreign key An a nonprimary attribute in one relation that appears as a primary key in anothere.g. departmentID in INSTRUCTOR relation. 11/17/2016MGIS 301 Management Information Systems14

Keys: Examples Primary key INSTRUCTOR(instructorID, instructorName, lastName, academicTitle, dateEmployed)COURSE(courseID, courseName, creditHRS) DEPARTMENT(departmentID, departmentName)Composite key INSTRUCTORCOURSE(instructorID, courseID, courseCoordinator)Foreign key INSTRUCTOR(instructorID, instructorName, lastName, academicTitle, dateEmployed, departmentID)INSTRUCTORCOURSE(instructorID, courseID, courseCoordinator)

11/17/2016MGIS 301 Management Information Systems15

11/17/2016MGIS 301 Management Information SystemsPrimary Keys


11/17/2016MGIS 301 Management Information Systems

Composite Key


Foreign Key

11/17/2016MGIS 301 Management Information Systems18

11/17/2016MGIS 301 Management Information Systems

Foreign Keys


Relational AlgebraAn algebra is a mathematical system of operands and operators Operands Relations (tables) OperatorsUnionIntersectionDifferenceSelectionProjection JoinRenaming

Used for creating a programminglanguage, known as SQL, capable of creating and modifying relations and relationships, as well as,manipulating data contained in one or more relations11/17/2016MGIS 301 Management Information Systems20

Tuple (Record) Operations: CRUD In a given relationCreate Creates a new tuple Read Reads an existing tuple Update Updates an existing tuple DeleteDeletes an existing tuple11/17/2016MGIS 301 Management Information Systems21

Data EntryElectronic forms (e-forms)Mostly browser basedForm elements LabelText box Radio button Check box Menu SliderAction buttons (Save, Submit, OK, Cancel, Help etc.)etc.11/17/2016MGIS 301 Management Information Systems22

Example: A Raw Form 11/17/2016MGIS 301 Management Information Systems23

QueriesFiltered data for a specific purpose To make a query Decide what data are requiredDefine a criterion to select data to fulfill the requirement Identify the relations and the fields that holds the data Perform the query To perform a query Write an SQL statement Use a query-by-example (QBE) tool11/17/2016MGIS 301 Management Information Systems24

Example: A Query11/17/2016MGIS 301 Management Information Systems25

Example (cont.)The SQL Statement to perform the query: SELECT INSTRUCTOR.academicTitle, INSTRUCTOR.instructorName, INSTRUCTOR.lastName, DEPARTMENT.departmentName


WHERE DEPARTMENT.departmentName = Economics;

11/17/2016MGIS 301 Management Information Systems

Thank God, I dont have to know this in MGIS 301!26

ReportsA report is an organized and summarized data for a particular purpose Report elements TablesCharts Report types Regular reports Time-triggered reports Event-triggered reports Ad-hoc reports On a per-requirement basis11/17/2016MGIS 301 Management Information Systems27

11/17/2016MGIS 301 Management Information SystemsExample: A Raw Report


Database Design

11/17/2016MGIS 301 Management Information Systems29

Database DesignModeling organizational data Output: Conceptual data model A representation of the organizational data (ERD)Conceptual database design Output: Conceptual database modelA representation of normalized data in detail Physical database design Output: Physical database modelSpecific DBMS representation the conceptual database modelNext: Database implementation (in the labs) Programming the database visually or with SQL programming language 11/17/2016MGIS 301 Management Information Systems30

Steps of Conceptual Database Design Determine the relevant entitiesIndicate the relevant attributes of each entity type For each entity, decide which one(s) of these characteristics can be a candidate for uniquely identifying the entitySet the most useful candidate key as the identifier Determine the relationships among the entities Connect entities through relationships Determine the business rules Indicate the cardinality of the relationships 11/17/2016MGIS 301 Management Information Systems31

Entities Similar persons, places, things, events, or concepts Categories of data The symbol and an exampleENTITYattribute1attribute2attributeMSTUDENTstudentIDnationalIDstudentNamelastName birthDatebirthPlacegendercellPhoneeMailhomeAddress yearAdmittedyearIncumGPAyearGraduated

Candidate keysEntity name (singular)Attribute listIdentifier11/17/2016MGIS 301 Management Information Systems32

Entities (cont.)Entity type Similar entities Three generic entity types Strong entity Weak entity Associative entity Entity instance (or occurrence) Single example of an entity 11/17/2016MGIS 301 Management Information Systems33

Entities and Entity Instances STUDENTstudentIDnationalIDstudentNamelastName birthDatebirthPlacegendercellPhoneeMailhomeAddress yearAdmittedyearIncumGPAyearGraduated

STUDENT0000001555 55 555 551EminKendinden Jul. 20,

Entity Entity instance 11/17/2016MGIS 301 Management Information Systems34

AttributesAttributes Relevant characteristics of each entity for the organizat


View more >