SlideShare a Scribd company logo
MGIS 301 Management
Information Systems
Week 04
Databases and Database Technologies
M. Murat Albayrakoglu
Agenda
• Transferable skill
• Database concepts
• Database design
• Database management system (DBMS)
11/17/2016 MGIS 301 Management Information Systems 2
Transferable Skills
• Any skill that applies to various roles and tasks throughout an
individual’s career
• Can be acquired via various activities
• Informal
• Formal
• Categories
• Communication skills
• Analytical skills
• Technical skills
• Personal skills
• Organizational skills
Database skills = Knowledge + Practice
11/17/2016 MGIS 301 Management Information Systems 3
Database Concepts
11/17/2016 MGIS 301 Management Information Systems 4
Basics
• Bit (b): 0 or 1
• Byte (B): 8 bits; size of each ASCII character
• Data storage needs measured in
kB = 103 B
MB= 106 B
GB = 109 B
TB = 1012 B
PB = 1015 B
EB = 1018 B
ZB = 1021 B
11/17/2016 MGIS 301 Management Information Systems 5
Database Definition
• A 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/2016 MGIS 301 Management Information Systems 6
Database Advantages
• Program-data independence
• Data changes without changing programs
• New programs can use existing data
• Planned data redundancy
• Limited replication of data
• Storage space efficiency
• Improved data consistency
• Reduced chance for data inconsistency
• Improved data sharing
• Authorized users
• User view specific to a task
• Increased productivity of application development
• Focus on accessing data rather than creating and updating data
• Focus on functionality
11/17/2016 MGIS 301 Management Information Systems 7
Database Advantages (cont.)
• Enforcement of standards
• Single authority to enforce data standards: DBA
• Improved data quality
• Entry and modification constraints
• Integrity constraints
• Improved data accessibility and responsiveness
• Easy to get data from within the authorized user views
• Reduced program maintenance
• No impact of data changes on the programs to a certain limit
• Improved decision support
• Fast access to high quality data
• Faster and more accurate decisions
11/17/2016 MGIS 301 Management Information Systems 8
Database Disadvantages
• New IT specialists
• Database developers and administrators
• Installation and maintenance costs
• Getting, operating and maintaining multi-user systems
• Apparent complexity
• User, developer and administrator training
• Conversion costs
• Changing from legacy systems to a database environment
• Security and continuity risks
• Backup and recovery issues
• Organizational conflicts
• Data definition, ownership, and maintenance rights
11/17/2016 MGIS 301 Management Information Systems 9
Database Models
Pre-Relational and Relational
Models
• Flat 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/2016 MGIS 301 Management Information Systems 10
Relational Database Model
History
• Edgar F. Codd proposed the
model in 1970
• Based on the concepts of
relational algebra
• First commercial
implementation in 1979
• Oracle’s SQL RDBMS
Major players today
• Proprietary
• IBM DB2
• Microsoft Access
• Microsoft SQL Server
• Oracle
• Open source
• MySQL
• PostGRE SQL
• SQLite
11/17/2016 MGIS 301 Management Information Systems 11
Relations
• Relation (Table)
• Named and two-dimensional table, e.g. INSTRUCTOR
• Contains columns e.g. instructorID, instructorName, lastName, academicTitle,
dateEmployed
• Contains data, e.g. 555551, Mehmet Murat, Albayrakoglu, Instructor, 15/09/2016
in its rows
• Attribute (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/2016 MGIS 301 Management Information Systems 12
Example: A Table
11/17/2016 MGIS 301 Management Information Systems 13
Keys
• Primary key
• An attribute (or combination of attributes) whose value is unique across all occurrences of a
relation
• e.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 = 007
• Foreign key
• An a nonprimary attribute in one relation that appears as a primary key in another
• e.g. departmentID in INSTRUCTOR relation.
11/17/2016 MGIS 301 Management Information Systems 14
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/2016 MGIS 301 Management Information Systems 15
11/17/2016 MGIS 301 Management Information Systems
Primary Keys
16
11/17/2016 MGIS 301 Management Information Systems
Composite Key
17
Foreign Key
11/17/2016 MGIS 301 Management Information Systems 18
11/17/2016 MGIS 301 Management Information Systems
Foreign Keys
19
Relational Algebra
• An algebra is a mathematical system of operands and operators
• Operands
• Relations (tables)
• Operators
• Union
• Intersection
• Difference
• Selection
• Projection
• Join
• Renaming
Used for creating a programming
language, known as SQL, capable of
creating and modifying relations
and relationships, as well as,
manipulating data contained in one
or more relations
11/17/2016 MGIS 301 Management Information Systems 20
Tuple (Record) Operations: CRUD
• In a given relation
• Create
• Creates a new tuple
• Read
• Reads an existing tuple
• Update
• Updates an existing tuple
• Delete
• Deletes an existing tuple
11/17/2016 MGIS 301 Management Information Systems 21
Data Entry
• Electronic forms (e-forms)
• Mostly browser based
• Form elements
• Label
• Text box
• Radio button
• Check box
• Menu
• Slider
• Action buttons (Save, Submit, OK, Cancel, Help etc.)
• etc.
11/17/2016 MGIS 301 Management Information Systems 22
Example: A Raw Form
11/17/2016 MGIS 301 Management Information Systems 23
Queries
• Filtered data for a specific purpose
• To make a query
• Decide what data are required
• Define 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) tool
11/17/2016 MGIS 301 Management Information Systems 24
Example: A Query
11/17/2016 MGIS 301 Management Information Systems 25
Example (cont.)
The SQL Statement to perform the query:
SELECT INSTRUCTOR.academicTitle, INSTRUCTOR.instructorName,
INSTRUCTOR.lastName, DEPARTMENT.departmentName
FROM DEPARTMENT INNER JOIN INSTRUCTOR ON
DEPARTMENT.[departmentID] = INSTRUCTOR.[departmentID]
WHERE DEPARTMENT.departmentName = ‘Economics’;
11/17/2016 MGIS 301 Management Information Systems
Thank God, I
don’t have to
know this in
MGIS 301!
26
Reports
• A report is an organized and summarized data for a particular purpose
• Report elements
• Tables
• Charts
• Report types
• Regular reports
• Time-triggered reports
• Event-triggered reports
• Ad-hoc reports
• On a per-requirement basis
11/17/2016 MGIS 301 Management Information Systems 27
11/17/2016 MGIS 301 Management Information Systems
Example: A Raw Report
28
Database Design
11/17/2016 MGIS 301 Management Information Systems 29
Database Design
• Modeling organizational data
• Output: Conceptual data model
• A representation of the organizational data (ERD)
• Conceptual database design
• Output: Conceptual database model
• A representation of normalized data in detail
• Physical database design
• Output: Physical database model
• Specific DBMS representation the conceptual database model
• Next: Database implementation (in the labs)
• Programming the database visually or with SQL programming language
11/17/2016 MGIS 301 Management Information Systems 30
Steps of Conceptual Database Design
1. Determine the relevant entities
2. Indicate the relevant attributes of each entity type
3. For each entity, decide which one(s) of these characteristics can be
a candidate for uniquely identifying the entity
4. Set the most useful candidate key as the identifier
5. Determine the relationships among the entities
6. Connect entities through relationships
7. Determine the business rules
8. Indicate the cardinality of the relationships
11/17/2016 MGIS 301 Management Information Systems 31
Entities
• Similar persons, places, things, events, or concepts
• Categories of data
• The symbol and an example
ENTITY
attribute1
attribute2
…
attributeM
STUDENT
studentID
nationalID
studentName
lastName
birthDate
birthPlace
gender
cellPhone
eMail
homeAddress
yearAdmitted
yearIn
cumGPA
yearGraduated
Candidate keys
Entity name (singular)
Attribute list
Identifier




11/17/2016 MGIS 301 Management Information Systems 32
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/2016 MGIS 301 Management Information Systems 33
Entities and Entity Instances
STUDENT
studentID
nationalID
studentName
lastName
birthDate
birthPlace
gender
cellPhone
eMail
homeAddress
yearAdmitted
yearIn
cumGPA
yearGraduated
STUDENT
0000001
555 55 555 551
Emin
Kendinden
Jul. 20, 1999
Ankara
Male
+905555555551
eken@ku.edu.tr
…
…
…
…
…
Entity Entity instance11/17/2016 MGIS 301 Management Information Systems 34
Attributes
• Attributes
• Relevant characteristics of each entity for the organization
• Each attribute belongs to a domain, e.g. text, integer, date, hyperlink, file etc.
• Candidate key
• One or more of the attributes of a particular entity that is used to identify
each specific occurrence of the entity
• e.g. the citizenship number, tax ID, or school ID.
• Identifier
• The candidate key chosen to be the unique identifying characteristic of each
entity
11/17/2016 MGIS 301 Management Information Systems 35
Attribute Types
• Multivalued attribute, e.g. phone numbers
• Repeating group, e.g. children or various addresses
• Required attribute, e.g. student ID
• Optional attribute, e.g. second name
• Composite attribute, e.g. course ID and student ID
• Derived attribute, e.g. age = today – birthDate
11/17/2016 MGIS 301 Management Information Systems 36
Relationships
• Any association of two or more instances of entities relevant to a
business
• Degrees of a relationship
• Unary (advanced)
• Binary (in this course)
• Ternary (advanced)
• Normalized relationships
• Necessary to preserve data integrity
11/17/2016 MGIS 301 Management Information Systems 37
Relationships: Depiction
• Entity 1 does something to Entity 2
• Something is done to Entity 2 by Entity 1
ENTITY 2
attribute1
attribute2
…
attributeN
ENTITY 1
attribute1
attribute2
…
attributeM
Something_done_by
Does_something_to
11/17/2016 MGIS 301 Management Information Systems 38
Relationships: Example
COURSE
courseID
courseName
creditHrs
…
STUDENT
studentID
studentName
lastName
…
Taken by
Takes
11/17/2016 MGIS 301 Management Information Systems 39
Relationships: Optionality and Cardinality
Cardinality
One Many
Optionality
Optional
Optional
one
Optional
many
Mandatory
Mandatory
one
Mandatory
many
• Optional one
• Mandatory one
• Optional many
• Mandatory many
• Minimum and maximum cardinalities
may be defined
• e.g. a class section may have between
a minimum of 5 and a maximum of 50
students
11/17/2016 MGIS 301 Management Information Systems 40
Optionality and Cardinality Example
• From left-to-right:
A student always takes one or more courses
• From right-to-left:
A course is sometimes taken by one or more students
COURSE
CourseID
courseName
creditHrs
…
STUDENT
studentID
studentName
lastName
…
Taken by
Takes
11/17/2016 MGIS 301 Management Information Systems 41
Cardinality Types
11/17/2016
MGIS 301 Management Information Systems
42
One-to-one
One-to-many
Many-to-many
More Examples and Exercises
Consider the following relationships. Describe the two-way relationships in
plain English. Draw the ERD segments connecting each pair.
• INSTRUCTOR advises STUDENT
• STUDENT gets PC
• STUDENT earns SCHOLARSHIP
• STUDENT lives in ROOM
• ROOM contains FURNITURE
• ROOM belongs to DORM
• PUBLISHER publishes BOOK
• AUTHOR writes BOOK
• BOOKSTORE sells BOOK
• BOOKSTORE ships BOOK
• CUSTOMER orders BOOK
• CUSTOMER pays for BOOK
11/17/2016 MGIS 301 Management Information Systems 43
Degree of Relationships
• Number of entities participating in a relationship
Unary Binary Ternary
11/17/2016 MGIS 301 Management Information Systems 44
Entity Relationship Diagram (ERD)
• Create entity-relationship segments
• Combine them to a complete diagram
E1 E2
E2 E3
E1 E4
E1 E2
E3
E4
11/17/2016 MGIS 301 Management Information Systems 45
Conceptual Database Design
1. Normalize the relationships in the data model (ERD)
2. Transform entities into relations
3. Create relationships
4. Merge relations
11/17/2016 MGIS 301 Management Information Systems 46
Normalization
• Normalization is a process for converting a single many-to-many
relationship into two one-to-many relationships
• Normalization helps
• Avoid data anomalies
• Protect data integrity
COURSE
CourseID
courseName
creditHrs
STUDENT
studentID
studentName
lastName
…
Takes
STUDENTCOURSE
studentID
CourseID
GradeTaken by
Refers to
Referred by
11/17/2016 MGIS 301 Management Information Systems 47
Transforming Entities into Relations
• A relation has the following form:
• ENTITY(primaryKey, attribute1, attribute2, … , attributeN)
• Examples
• STUDENT(studentID, studentName, lastName, birthDate,
birthplace,...)
• COURSE(courseID, courseName, creditHrs)
• STUDENTCOURSE(studentID, courseID, grade)
• DEPARTMENT(departmentID, departmentName)
11/17/2016 MGIS 301 Management Information Systems 48
Creating Relationships
• DEPARTMENT(departmentID, departmentName)
STUDENT(studentID, studentName, lastName, birthDate,
birthplace,…, departmentID)
• DEPARTMENT(departmentID, departmentName)
COURSE(courseID, courseName, creditHrs, departmentID)
11/17/2016 MGIS 301 Management Information Systems 49
How to
Insert the primary
key of the relation
on the one-side of
the relationship
into the relation
on the many-side.
Merging Relations
• DEPARTMENT(departmentID, departmentName)
STUDENT(studentID, studentName, lastName, birthDate,
birthplace,…, departmentID)
COURSE(courseID, courseName, creditHrs, departmentID)
11/17/2016 MGIS 301 Management Information Systems 50
How to
Reduce the
number of
repeating
entities to one.
Physical Database Design
1. Create relations by using the RDBMS’s visual programming tools or SQL
language
2. Establish relationships among relations by using the RDBMS’s visual
programming tools or SQL language
3. Design data entry forms by using the RDBMS’s visual programming tools
4. Design queries by using the RDBMS’s visual programming tools or SQL
language
5. Design regular reports by using the RDBMS’s visual programming tools
6. Design menus by using the RDBMS’s visual programming tools
11/17/2016 MGIS 301 Management Information Systems 51
Database Implementation
11/17/2016 MGIS 301 Management Information Systems 52
Database Management Systems
(DBMS)
11/17/2016 MGIS 301 Management Information Systems 53
Components of a DBMS
Create and change the
logical structure of data
Create-Read-Update-Delete
Make queries
Create and modify menus,
forms and reports
Data authorization
Recovery and backup
Structural changes
11/17/2016 MGIS 301 Management Information Systems 54
DBMSEngine
Data
dictionary
Database
Data definition
language
Data manipulation
language
Data administration
tools
Application generation
tools
Database
Database
Client-Server Architecture
Database
server
Application
server
Web
server
Internet
Clients
11/17/2016 MGIS 301 Management Information Systems 55
Centralized Database
Internet
11/17/2016 MGIS 301 Management Information Systems 56
Distributed Database
Internet
11/17/2016 MGIS 301 Management Information Systems 57
Q&A
?
11/17/2016 MGIS 301 Management Information Systems 58
Next Week
• We will have two online quizzes
• The first due Tuesday, 10/25/2016
• The second due Thursday, 10/27/2016
• We will have a 2-page written assignment from Chapter 1 of our
textbook.
• We will discuss the issues related to Chapter 6 and Appendix C of our
textbook.
11/17/2016 MGIS 301 Management Information Systems 59

More Related Content

PPT
6. Sim Fanji database dan manajemen informasi
PPT
02010 ppt ch02
PPT
Data models
PDF
A Survey of Non -Relational Databases with Big Data
PPT
Database Systems
PPT
PPTX
Mis chapter 7 database systems
PPT
6. Sim Fanji database dan manajemen informasi
02010 ppt ch02
Data models
A Survey of Non -Relational Databases with Big Data
Database Systems
Mis chapter 7 database systems

What's hot (16)

DOCX
New sap bo 4.0 course content
PPTX
Data models
PPTX
Slide 2 data models
PPTX
Database fundamentals(database)
PPTX
Database Management System
PDF
A COMPARATIVE STUDY ON BIG DATA HANDLING USING RELATIONAL AND NON-RELATIONAL ...
PPTX
Joins in a distributed world Distributed Matters Barcelona 2015
PPT
Different data models
PPT
Tg03
PPT
DBMS topic in PU
PPT
Database an introduction
PPT
Introduction to structured query language (sql)
PPT
Chapter 05
PPT
Fundamentals of Database ppt ch02
PPTX
Ch01 CMPT110
New sap bo 4.0 course content
Data models
Slide 2 data models
Database fundamentals(database)
Database Management System
A COMPARATIVE STUDY ON BIG DATA HANDLING USING RELATIONAL AND NON-RELATIONAL ...
Joins in a distributed world Distributed Matters Barcelona 2015
Different data models
Tg03
DBMS topic in PU
Database an introduction
Introduction to structured query language (sql)
Chapter 05
Fundamentals of Database ppt ch02
Ch01 CMPT110
Ad

Viewers also liked (6)

PPTX
ISL 601 Proje Yönetimi 1. Hafta Ders Notları
PPT
Emerging DB Technologies
PPTX
Proje Yönetimi
PPTX
Proje Nasıl Hazırlanır?
PDF
PROJE YONETIMI KILAVUZU
PPTX
Proje yönetimi notları
ISL 601 Proje Yönetimi 1. Hafta Ders Notları
Emerging DB Technologies
Proje Yönetimi
Proje Nasıl Hazırlanır?
PROJE YONETIMI KILAVUZU
Proje yönetimi notları
Ad

Similar to MGIS 301 Databases and Database Technologies (20)

PPT
Spatial Data Base Mangment-Teaching Material PPT.ppt
DOCX
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
PDF
PHP Roadshow - MySQL Database Essentials
PPT
Database management system presentation
PDF
CBSE XII Database Concepts And MySQL Presentation
PPT
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
PPT
DBMS an Example
PDF
Database Systems - Lecture Week 1
PPT
joijoiiiiiiiiiiiiiiiiiiiiijoijiojoijoijoijoij
PDF
Relational
PPTX
DBMS introduction
PPTX
DBMS_Lect.1 intro.pptx sdcaacweewcssrwe w
PPTX
1585625790_SQL-SESSION1.pptx
PDF
DATABASE MANAGEMENT SYSTEMS.pdf
PDF
DATABASE MANAGEMENT SYSTEMS university course materials useful for students ...
PPT
Lecture-8-The-GIS-Database-Part-1.ppt
DOCX
Database Management Systems (Mcom Ecommerce)
PPTX
DBMS_Unit_1.pptx
PDF
oracle intro
PPTX
Ch 2-introduction to dbms
Spatial Data Base Mangment-Teaching Material PPT.ppt
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
PHP Roadshow - MySQL Database Essentials
Database management system presentation
CBSE XII Database Concepts And MySQL Presentation
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
DBMS an Example
Database Systems - Lecture Week 1
joijoiiiiiiiiiiiiiiiiiiiiijoijiojoijoijoijoij
Relational
DBMS introduction
DBMS_Lect.1 intro.pptx sdcaacweewcssrwe w
1585625790_SQL-SESSION1.pptx
DATABASE MANAGEMENT SYSTEMS.pdf
DATABASE MANAGEMENT SYSTEMS university course materials useful for students ...
Lecture-8-The-GIS-Database-Part-1.ppt
Database Management Systems (Mcom Ecommerce)
DBMS_Unit_1.pptx
oracle intro
Ch 2-introduction to dbms

Recently uploaded (20)

PPTX
Institutional Correction lecture only . . .
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Cell Types and Its function , kingdom of life
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Presentation on HIE in infants and its manifestations
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Structure & Organelles in detailed.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Institutional Correction lecture only . . .
Computing-Curriculum for Schools in Ghana
Cell Types and Its function , kingdom of life
O5-L3 Freight Transport Ops (International) V1.pdf
Final Presentation General Medicine 03-08-2024.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
102 student loan defaulters named and shamed – Is someone you know on the list?
Presentation on HIE in infants and its manifestations
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial diseases, their pathogenesis and prophylaxis
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
A systematic review of self-coping strategies used by university students to ...
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf

MGIS 301 Databases and Database Technologies

  • 1. MGIS 301 Management Information Systems Week 04 Databases and Database Technologies M. Murat Albayrakoglu
  • 2. Agenda • Transferable skill • Database concepts • Database design • Database management system (DBMS) 11/17/2016 MGIS 301 Management Information Systems 2
  • 3. Transferable Skills • Any skill that applies to various roles and tasks throughout an individual’s career • Can be acquired via various activities • Informal • Formal • Categories • Communication skills • Analytical skills • Technical skills • Personal skills • Organizational skills Database skills = Knowledge + Practice 11/17/2016 MGIS 301 Management Information Systems 3
  • 4. Database Concepts 11/17/2016 MGIS 301 Management Information Systems 4
  • 5. Basics • Bit (b): 0 or 1 • Byte (B): 8 bits; size of each ASCII character • Data storage needs measured in kB = 103 B MB= 106 B GB = 109 B TB = 1012 B PB = 1015 B EB = 1018 B ZB = 1021 B 11/17/2016 MGIS 301 Management Information Systems 5
  • 6. Database Definition • A 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/2016 MGIS 301 Management Information Systems 6
  • 7. Database Advantages • Program-data independence • Data changes without changing programs • New programs can use existing data • Planned data redundancy • Limited replication of data • Storage space efficiency • Improved data consistency • Reduced chance for data inconsistency • Improved data sharing • Authorized users • User view specific to a task • Increased productivity of application development • Focus on accessing data rather than creating and updating data • Focus on functionality 11/17/2016 MGIS 301 Management Information Systems 7
  • 8. Database Advantages (cont.) • Enforcement of standards • Single authority to enforce data standards: DBA • Improved data quality • Entry and modification constraints • Integrity constraints • Improved data accessibility and responsiveness • Easy to get data from within the authorized user views • Reduced program maintenance • No impact of data changes on the programs to a certain limit • Improved decision support • Fast access to high quality data • Faster and more accurate decisions 11/17/2016 MGIS 301 Management Information Systems 8
  • 9. Database Disadvantages • New IT specialists • Database developers and administrators • Installation and maintenance costs • Getting, operating and maintaining multi-user systems • Apparent complexity • User, developer and administrator training • Conversion costs • Changing from legacy systems to a database environment • Security and continuity risks • Backup and recovery issues • Organizational conflicts • Data definition, ownership, and maintenance rights 11/17/2016 MGIS 301 Management Information Systems 9
  • 10. Database Models Pre-Relational and Relational Models • Flat 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/2016 MGIS 301 Management Information Systems 10
  • 11. Relational Database Model History • Edgar F. Codd proposed the model in 1970 • Based on the concepts of relational algebra • First commercial implementation in 1979 • Oracle’s SQL RDBMS Major players today • Proprietary • IBM DB2 • Microsoft Access • Microsoft SQL Server • Oracle • Open source • MySQL • PostGRE SQL • SQLite 11/17/2016 MGIS 301 Management Information Systems 11
  • 12. Relations • Relation (Table) • Named and two-dimensional table, e.g. INSTRUCTOR • Contains columns e.g. instructorID, instructorName, lastName, academicTitle, dateEmployed • Contains data, e.g. 555551, Mehmet Murat, Albayrakoglu, Instructor, 15/09/2016 in its rows • Attribute (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/2016 MGIS 301 Management Information Systems 12
  • 13. Example: A Table 11/17/2016 MGIS 301 Management Information Systems 13
  • 14. Keys • Primary key • An attribute (or combination of attributes) whose value is unique across all occurrences of a relation • e.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 = 007 • Foreign key • An a nonprimary attribute in one relation that appears as a primary key in another • e.g. departmentID in INSTRUCTOR relation. 11/17/2016 MGIS 301 Management Information Systems 14
  • 15. 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/2016 MGIS 301 Management Information Systems 15
  • 16. 11/17/2016 MGIS 301 Management Information Systems Primary Keys 16
  • 17. 11/17/2016 MGIS 301 Management Information Systems Composite Key 17
  • 18. Foreign Key 11/17/2016 MGIS 301 Management Information Systems 18
  • 19. 11/17/2016 MGIS 301 Management Information Systems Foreign Keys 19
  • 20. Relational Algebra • An algebra is a mathematical system of operands and operators • Operands • Relations (tables) • Operators • Union • Intersection • Difference • Selection • Projection • Join • Renaming Used for creating a programming language, known as SQL, capable of creating and modifying relations and relationships, as well as, manipulating data contained in one or more relations 11/17/2016 MGIS 301 Management Information Systems 20
  • 21. Tuple (Record) Operations: CRUD • In a given relation • Create • Creates a new tuple • Read • Reads an existing tuple • Update • Updates an existing tuple • Delete • Deletes an existing tuple 11/17/2016 MGIS 301 Management Information Systems 21
  • 22. Data Entry • Electronic forms (e-forms) • Mostly browser based • Form elements • Label • Text box • Radio button • Check box • Menu • Slider • Action buttons (Save, Submit, OK, Cancel, Help etc.) • etc. 11/17/2016 MGIS 301 Management Information Systems 22
  • 23. Example: A Raw Form 11/17/2016 MGIS 301 Management Information Systems 23
  • 24. Queries • Filtered data for a specific purpose • To make a query • Decide what data are required • Define 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) tool 11/17/2016 MGIS 301 Management Information Systems 24
  • 25. Example: A Query 11/17/2016 MGIS 301 Management Information Systems 25
  • 26. Example (cont.) The SQL Statement to perform the query: SELECT INSTRUCTOR.academicTitle, INSTRUCTOR.instructorName, INSTRUCTOR.lastName, DEPARTMENT.departmentName FROM DEPARTMENT INNER JOIN INSTRUCTOR ON DEPARTMENT.[departmentID] = INSTRUCTOR.[departmentID] WHERE DEPARTMENT.departmentName = ‘Economics’; 11/17/2016 MGIS 301 Management Information Systems Thank God, I don’t have to know this in MGIS 301! 26
  • 27. Reports • A report is an organized and summarized data for a particular purpose • Report elements • Tables • Charts • Report types • Regular reports • Time-triggered reports • Event-triggered reports • Ad-hoc reports • On a per-requirement basis 11/17/2016 MGIS 301 Management Information Systems 27
  • 28. 11/17/2016 MGIS 301 Management Information Systems Example: A Raw Report 28
  • 29. Database Design 11/17/2016 MGIS 301 Management Information Systems 29
  • 30. Database Design • Modeling organizational data • Output: Conceptual data model • A representation of the organizational data (ERD) • Conceptual database design • Output: Conceptual database model • A representation of normalized data in detail • Physical database design • Output: Physical database model • Specific DBMS representation the conceptual database model • Next: Database implementation (in the labs) • Programming the database visually or with SQL programming language 11/17/2016 MGIS 301 Management Information Systems 30
  • 31. Steps of Conceptual Database Design 1. Determine the relevant entities 2. Indicate the relevant attributes of each entity type 3. For each entity, decide which one(s) of these characteristics can be a candidate for uniquely identifying the entity 4. Set the most useful candidate key as the identifier 5. Determine the relationships among the entities 6. Connect entities through relationships 7. Determine the business rules 8. Indicate the cardinality of the relationships 11/17/2016 MGIS 301 Management Information Systems 31
  • 32. Entities • Similar persons, places, things, events, or concepts • Categories of data • The symbol and an example ENTITY attribute1 attribute2 … attributeM STUDENT studentID nationalID studentName lastName birthDate birthPlace gender cellPhone eMail homeAddress yearAdmitted yearIn cumGPA yearGraduated Candidate keys Entity name (singular) Attribute list Identifier     11/17/2016 MGIS 301 Management Information Systems 32
  • 33. 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/2016 MGIS 301 Management Information Systems 33
  • 34. Entities and Entity Instances STUDENT studentID nationalID studentName lastName birthDate birthPlace gender cellPhone eMail homeAddress yearAdmitted yearIn cumGPA yearGraduated STUDENT 0000001 555 55 555 551 Emin Kendinden Jul. 20, 1999 Ankara Male +905555555551 eken@ku.edu.tr … … … … … Entity Entity instance11/17/2016 MGIS 301 Management Information Systems 34
  • 35. Attributes • Attributes • Relevant characteristics of each entity for the organization • Each attribute belongs to a domain, e.g. text, integer, date, hyperlink, file etc. • Candidate key • One or more of the attributes of a particular entity that is used to identify each specific occurrence of the entity • e.g. the citizenship number, tax ID, or school ID. • Identifier • The candidate key chosen to be the unique identifying characteristic of each entity 11/17/2016 MGIS 301 Management Information Systems 35
  • 36. Attribute Types • Multivalued attribute, e.g. phone numbers • Repeating group, e.g. children or various addresses • Required attribute, e.g. student ID • Optional attribute, e.g. second name • Composite attribute, e.g. course ID and student ID • Derived attribute, e.g. age = today – birthDate 11/17/2016 MGIS 301 Management Information Systems 36
  • 37. Relationships • Any association of two or more instances of entities relevant to a business • Degrees of a relationship • Unary (advanced) • Binary (in this course) • Ternary (advanced) • Normalized relationships • Necessary to preserve data integrity 11/17/2016 MGIS 301 Management Information Systems 37
  • 38. Relationships: Depiction • Entity 1 does something to Entity 2 • Something is done to Entity 2 by Entity 1 ENTITY 2 attribute1 attribute2 … attributeN ENTITY 1 attribute1 attribute2 … attributeM Something_done_by Does_something_to 11/17/2016 MGIS 301 Management Information Systems 38
  • 40. Relationships: Optionality and Cardinality Cardinality One Many Optionality Optional Optional one Optional many Mandatory Mandatory one Mandatory many • Optional one • Mandatory one • Optional many • Mandatory many • Minimum and maximum cardinalities may be defined • e.g. a class section may have between a minimum of 5 and a maximum of 50 students 11/17/2016 MGIS 301 Management Information Systems 40
  • 41. Optionality and Cardinality Example • From left-to-right: A student always takes one or more courses • From right-to-left: A course is sometimes taken by one or more students COURSE CourseID courseName creditHrs … STUDENT studentID studentName lastName … Taken by Takes 11/17/2016 MGIS 301 Management Information Systems 41
  • 42. Cardinality Types 11/17/2016 MGIS 301 Management Information Systems 42 One-to-one One-to-many Many-to-many
  • 43. More Examples and Exercises Consider the following relationships. Describe the two-way relationships in plain English. Draw the ERD segments connecting each pair. • INSTRUCTOR advises STUDENT • STUDENT gets PC • STUDENT earns SCHOLARSHIP • STUDENT lives in ROOM • ROOM contains FURNITURE • ROOM belongs to DORM • PUBLISHER publishes BOOK • AUTHOR writes BOOK • BOOKSTORE sells BOOK • BOOKSTORE ships BOOK • CUSTOMER orders BOOK • CUSTOMER pays for BOOK 11/17/2016 MGIS 301 Management Information Systems 43
  • 44. Degree of Relationships • Number of entities participating in a relationship Unary Binary Ternary 11/17/2016 MGIS 301 Management Information Systems 44
  • 45. Entity Relationship Diagram (ERD) • Create entity-relationship segments • Combine them to a complete diagram E1 E2 E2 E3 E1 E4 E1 E2 E3 E4 11/17/2016 MGIS 301 Management Information Systems 45
  • 46. Conceptual Database Design 1. Normalize the relationships in the data model (ERD) 2. Transform entities into relations 3. Create relationships 4. Merge relations 11/17/2016 MGIS 301 Management Information Systems 46
  • 47. Normalization • Normalization is a process for converting a single many-to-many relationship into two one-to-many relationships • Normalization helps • Avoid data anomalies • Protect data integrity COURSE CourseID courseName creditHrs STUDENT studentID studentName lastName … Takes STUDENTCOURSE studentID CourseID GradeTaken by Refers to Referred by 11/17/2016 MGIS 301 Management Information Systems 47
  • 48. Transforming Entities into Relations • A relation has the following form: • ENTITY(primaryKey, attribute1, attribute2, … , attributeN) • Examples • STUDENT(studentID, studentName, lastName, birthDate, birthplace,...) • COURSE(courseID, courseName, creditHrs) • STUDENTCOURSE(studentID, courseID, grade) • DEPARTMENT(departmentID, departmentName) 11/17/2016 MGIS 301 Management Information Systems 48
  • 49. Creating Relationships • DEPARTMENT(departmentID, departmentName) STUDENT(studentID, studentName, lastName, birthDate, birthplace,…, departmentID) • DEPARTMENT(departmentID, departmentName) COURSE(courseID, courseName, creditHrs, departmentID) 11/17/2016 MGIS 301 Management Information Systems 49 How to Insert the primary key of the relation on the one-side of the relationship into the relation on the many-side.
  • 50. Merging Relations • DEPARTMENT(departmentID, departmentName) STUDENT(studentID, studentName, lastName, birthDate, birthplace,…, departmentID) COURSE(courseID, courseName, creditHrs, departmentID) 11/17/2016 MGIS 301 Management Information Systems 50 How to Reduce the number of repeating entities to one.
  • 51. Physical Database Design 1. Create relations by using the RDBMS’s visual programming tools or SQL language 2. Establish relationships among relations by using the RDBMS’s visual programming tools or SQL language 3. Design data entry forms by using the RDBMS’s visual programming tools 4. Design queries by using the RDBMS’s visual programming tools or SQL language 5. Design regular reports by using the RDBMS’s visual programming tools 6. Design menus by using the RDBMS’s visual programming tools 11/17/2016 MGIS 301 Management Information Systems 51
  • 52. Database Implementation 11/17/2016 MGIS 301 Management Information Systems 52
  • 53. Database Management Systems (DBMS) 11/17/2016 MGIS 301 Management Information Systems 53
  • 54. Components of a DBMS Create and change the logical structure of data Create-Read-Update-Delete Make queries Create and modify menus, forms and reports Data authorization Recovery and backup Structural changes 11/17/2016 MGIS 301 Management Information Systems 54 DBMSEngine Data dictionary Database Data definition language Data manipulation language Data administration tools Application generation tools Database Database
  • 56. Centralized Database Internet 11/17/2016 MGIS 301 Management Information Systems 56
  • 57. Distributed Database Internet 11/17/2016 MGIS 301 Management Information Systems 57
  • 58. Q&A ? 11/17/2016 MGIS 301 Management Information Systems 58
  • 59. Next Week • We will have two online quizzes • The first due Tuesday, 10/25/2016 • The second due Thursday, 10/27/2016 • We will have a 2-page written assignment from Chapter 1 of our textbook. • We will discuss the issues related to Chapter 6 and Appendix C of our textbook. 11/17/2016 MGIS 301 Management Information Systems 59