Review External modelling –subsetting the universe of phenomena into user’s views Conceptual modelling –synthesis of external models into a schematic representation.

Slides:



Advertisements
Similar presentations
The Relational Database Model
Advertisements

The Relational Model System Development Life Cycle Normalisation
Chapter Information Systems Database Management.
Normalization of Database Tables
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
1 Review #1 l Intro stuff –What is a database, 4 parts, 3 users, etc. l Architecture –Data independence –Three levels, two mappings –Jobs of the DBA.
Data Management Design
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Modeling & Designing the Database
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Normalization Quiz Tao Li Grant Horntvedt. 1. Which of the following statements is true: a. Normal forms can be derived by inspecting the data in various.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
1 C omputer information systems Design Instructor: Mr. Ahmed Al Astal IGGC1202 College Requirement University Of Palestine.
Chapter 4 The Relational Model.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Alternative data structure models there are two basic different data structure models with a number of variants storage of all map elements in a “combined”
Web-Enabled Decision Support Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Introduction to SQL Steve Perry
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Concepts and Terminology Introduction to Database.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
CORE 2: Information systems and Databases NORMALISING DATABASES.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
CS 1308 Computer Literacy and the Internet
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
©NIIT Normalizing and Denormalizing Data Lesson 2B / Slide 1 of 18 Objectives In this section, you will learn to: Describe the Top-down and Bottom-up approach.
Indexes and Views Unit 7.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Understand Tables and How to Create Them Database Administration Fundamentals LESSON 2.2.
Database: SQL, MySQL, LINQ and Java DB © by Pearson Education, Inc. All Rights Reserved.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Database Planning Database Design Normalization.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
 2012 Pearson Education, Inc. All rights reserved.
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Chapter 12 Information Systems.
Chapter 4 Relational Databases
CIS 336 str Competitive Success/snaptutorial.com
CIS 336 str Education for Service- -snaptutorial.com.
CIS 336 str Teaching Effectively-- snaptutorial.com.
Databases and Information Management
Chapter 9 Designing Databases
Chapter 4 Indexes.
CH 4 Indexes.
Databases.
Data Model.
CH 4 Indexes.
HAVING,INDEX,COMMIT & ROLLBACK
Databases and Information Management
logical design for relational database
Databases and Information Management
Review #1 Intro stuff What is a database, 4 parts, 3 users, etc.
Presentation transcript:

Review External modelling –subsetting the universe of phenomena into user’s views Conceptual modelling –synthesis of external models into a schematic representation called the entity-relationship model organizes the information content of the database Logical modelling –conversion of the conceptual model to a ‘computer’ model of tables and records Internal representation –usually not accessible to users computer control of I/O, storage, etc.

Review relation 1 relation 2 entity relationship entity relation 3 relation 4 external view Mapping External views Conceptual Model E-R model Logical Model Database Schema relation1 scheme(attr1, attr2, attr3) relation2 scheme(attr1, attr2,attr3,attr4) relation3 scheme(attr1, attr2, attr3) relation 4 scheme(attr1, attr2, attr3)

Mapping: Transforming the conceptual model to a logical model (spatial and attribute data) Conceptual model –identify entities street point segment landowner parcel –identify associations/relationships A. streets have segments B. parcels have segments C. segments have endpoints D. parcels have owners –develop the E-R model

Mapping: Transforming the Conceptual Model to the Logical Model Logical model identify attributes identify keys convert entities to relations street(street_id, street_name) owner(owner_name,owner_id,address) coordinates(point_id, X, Y) segment(segment_id) parcel(parcel_id, address) convert associations to relations street_segment(street_id, segment_id) parcel_segment(parcel_id, segment_id) segment_point(segment_id,point_id) owner_parcel(owner_id, parcel_id) Please see L&T pg for the completed tables. Note the error in the first table STREET. Street-ID data values should be 1 and 2 (not 101 and 102).

Normalization First Normal Form (1NF) insures database integrity on two levels –at the table level subdivides data into thematic groupings reduces (but doesn’t eliminate) data redundancies –at the attribute level eliminates non-atomic cell values eliminates multi-valued cells

Normalizing a Table Structure - An Example

scheme: maps (map_id, map_title, map_location) scheme: cartographer (map_id, first_initial, last_name, phone)

scheme: specs (map_id, map_type, coverage, format) scheme: project (map_id, project, institution, completed)

Simple SQL Queries Queries allow you to ask questions about the data stored in tables or perform an action –SQL statements allow selection, updating, and deletion of database records Select statements always contain the following clauses: SELECT attribute FROM tablename Select statements optionally contain qualifying clauses: WHERE criteria

The SELECT, FROM and WHERE clauses SELECT specifies the column or columns to be retrieved from the table. –SELECT attribute1, attribute3, attribute10 –SELECT * FROM specifies the table containing the data of interest –FROM tablename WHERE sets restriction on which items will be selected –WHERE attribute1 = ‘MONDAY’ –WHERE attribute3 >= and attribute3 < 3000 and attribute4 = ‘cat’ WHERE statements also establish JOINS –WHERE table1.attribute1 = table3.attribute1 and...

schemes: maps (mapid, map-title, map-location) data-catalog (mapid, catalog-num) map-index (catalog-num, index_name, theme, source) mapid map-title map-location maps data-catalog mapid catalog-num map-index catalog-num index-name theme source To construct an SQL statement identify the column names to be reported and the table they belong to for the SELECT clause identify necessary joins for the WHERE clause identify the selection criteria for the WHERE clause draw a picture if you have to Constructing an SQL statement

Sample SQL Statements - one table Select map-location From maps Select * From map-index Select map-title, map-location From maps Select * From map-index Where theme = ‘land cover’

Joins When a query requires data from more than one table you must create a join in the WHERE clause –for example to finding map titles with an index number of 1234 requires information from both the maps table and the map-index table that relationship is established in the WHERE clause between the column(s) in each table that connect the data you need in addition, each table that will be part of the join must be listed in the FROM clause –The SQL statement for the example above is: SELECT map-title FROM maps, data-catalog, map-index WHERE map-index.catalog-num = data-catalog.catalog.num and data-catalog.mapid = maps.mapid and map-index.index-name=‘1234’

More Sample SQL statements –find all map titles Select map-title From maps –find all the map titles whose theme is vegetation Select map-title From maps, data-catalog, map-index Where map-index.catalog-num=data-catalog.catalog-num and data-catalog-mapid=maps.mapid and map-index.theme=‘vegetation’ –find all map titles sourced to NASA in index 2637 Select map-title From maps, data-catalog, map-index Where map-index.catalog-num=data-catalog.catalog-num and data-catalog-mapid=maps.mapid and map-index.source=‘NASA’ and index-name=‘2637’