September 2000C.Watters1 Data & Database Management Systems (DBMS) ECMM6010.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Review Indra Budi Fakultas Ilmu Komputer UI 2 Database Introduction Database vs File Processing Main purpose of database Database Actors.
Review for Final Test Indra Budi
Management Information Systems, Sixth Edition
IS605/606: Information Systems Instructor: Dr. Boris Jukic
The Relational Model System Development Life Cycle Normalisation
Client/Server Databases and the Oracle 10g Relational Database
Chapter 2 The Relational Database Model
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Entity-Relationship Model and Diagrams (continued)
Data Management Design
Methodology Logical Database Design for the Relational Model
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
CSC 2720 Building Web Applications Database and SQL.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
Compe 301 ER - Model. Today DBMS Overview Data Modeling Going from conceptual requirements of a application to a concrete data model E/R Model.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
N. J. Taylor Database Management Systems (DBMS) 1.
The Relational Database Model
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Database Architecture Introduction to Databases. The Nature of Data Un-structured Semi-structured Structured.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Database Technical Session By: Prof. Adarsh Patel.
Introduction to SQL Steve Perry
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
FEN  Concepts and terminology  Operations (relational algebra)  Integrity constraints The relational model.
The Relational Database Model
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Database Design Methodology. Lesson 1: Introduction to Databases.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
RDBMS and SQL Saras M Srivastva PGT (Comp. Sc) Kendriya Vidyalaya Tenga Valley, Dist. Kameng (W) Arunachal Pradesh –
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
An Introduction to Database Systems دانشگاه علم و فناوری مازندران - طراحی و ایجاد بانک های اطلاعاتی 1.
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Chapter 3: Relational Databases
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Logical Database Design and Relation Data Model Muhammad Nasir
FEN Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Databases Introduction - concepts. Concepts of Relational Databases.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
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.
Chapter 4 Logical Database Design and the Relational Model
Normalization Referential Integrity
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Dr. Roueida Mohammed.
Presentation transcript:

September 2000C.Watters1 Data & Database Management Systems (DBMS) ECMM6010

September 2000C.Watters2 Objectives  See how DBMS work  Use use case diagrams to describe system use  Use E-R diagrams to describe data  Understand how to use data in DBMS on the Internet

September 2000C.Watters3 Role of DBMS and E-commerce Nearly 80% of all web accesses involve a database at the server 80% of web pages today are commercial in nature (Lee Giles, NEC) Most DBMS in use today are relational (SQL)

September 2000C.Watters4 So What is a Database Management System (DBMS)? General purpose software for processes of defining, creating, updating, querying, and manipulating data sets provides application-data independence

September 2000C.Watters5 But what is it??

September 2000C.Watters6 Why Bother? Separate application programs from data Provide multiple uses of data Provide a single copy of data –For concurrent use –Single updating enforce standards

September 2000C.Watters7 ANSI-SPARC Model logical & physical independence Physical indep Logical indep

September 2000C.Watters8 Design Process Functional Analysis & Use Cases Data modeling (E-R diagrams) Table design (Normalization)

September 2000C.Watters9 Defining Process: Use Case Users of the system are called actors Each business process that actors want is represented by a use case So the way the actors use the system is defined by a inter-related set of use case scenarios

September 2000C.Watters10 Use Case Sample Loan Manage Account Invest Customer Loan officer Teller

September 2000C.Watters11 Defining Data: Entity-Relationship (ER) Diagrams

September 2000C.Watters12 Attribute Variations

September 2000C.Watters13 Sample

September 2000C.Watters14 Constraints (N:M)

September 2000C.Watters15 Relational Model Based on sets a relation is a table with a schema

September 2000C.Watters16 Table Design Phase Rules of thumb –one table per entity –one table per relationship For sure Rule –each table has a unique identifier, called the primary key (1 or more attributes)

September 2000C.Watters17 Sample Schema Student(StNumber, StName, Major) Course(CNumber, CName, Professor) Takes(StNumber,Cnumber)

September 2000C.Watters18 Relation, Tuple, Attribute, Domain

September 2000C.Watters19 Relational Axioms There is no meaning to the order of tuples in a relation There is no meaning in the order of attributes in a relation Each tuple is unique in a relation Each attribute value is atomic Each tuple is an assertion

September 2000C.Watters20 Primary and Foreign keys Primary Key: attribute(s) that identify tuples

September 2000C.Watters21 IntraTable Connections Foreign Key: attribute(s) that link to primary key in another relation

September 2000C.Watters22 Relational Constraints Entity Integrity: no primary key is null Referential Integrity: –if a foreign key refers to a primary key in another relation then that key must exist

September 2000C.Watters23 Relational Operations (So what can you do with tables?) Choose one or more rows [SELECT] Choose one or more columns [PROJECT] Join 2 tables to make a new one [JOIN] set operations (union, intersection, minus) RESULT IS ALWAYS ANOTHER TABLE

September 2000C.Watters24 Querying with SQL Choose rows –Select * from students where name =“jones” Choose columns –Select name, number from students Combine tables –Select * from students, faculty where S.dept=F.dept Do any of the above with the new tables

September 2000C.Watters25 SELECT * from STUDENT Where Major=“CS” Choose rows from a table resulting table has same number of attributes

September 2000C.Watters26 picking columns SELECT SName from Student Choose one or columns from each row Resulting table has same number of rows

September 2000C.Watters27 Select * from STUDENT,BUILDING where STUDENT.Major = BUILDING.Major New table has all attributes from both New table has one row for every A’=A” pair

September 2000C.Watters28 USING SQL CREATE TABLE xyz INSERT into xyz (……,..,..,..) SELECT * FROM xyz SELECT a,c FROM xyz SELECT a,c FROM xyz WHERE a=“Joe” SELECT name,phone FROM A, B WHERE A.name=B.name UPDATE xyz WHERE ….

September 2000C.Watters29 Quality Design and Normalization Issues of quality –maintain semantics of the attributes and relations –reduction of redundant values –reduction of null values –elimination of spurious tuples

September 2000C.Watters30 1st Normal Form Attributes are single values i.e., no multivalued or composite attributes STUDENT(StNumber,Stname, {phone1,phone2}, HomeAddr) STUDENT(StNumber,Stname,HomeAddr) StPHONE(StNumber,phone)

September 2000C.Watters31 2nd Normal Form All attributes are fully Dependent on primary key COURSE(CNUMBER,SEC, Room,Cname) COURSE(CNUMBER,SEC,Room) CNAME(CNUMBER, Cname) Why do we care?? Updates!!

September 2000C.Watters32 3rd Normal Form No dependencies other than on primary key COURSE(CNUMBER,SEC,Prof,ProfOffice) COURSE(CNUMBER,SEC,Prof) PROFS(Prof, ProfOffice)

September 2000C.Watters33 And on and on… Most designs are 3NF (usually good-enough)

September 2000C.Watters34 Transaction Processing& concurrency control User AJoint AccountUser B read total: $100 take out $50 write total: $50 $50 write total: $50 Not good for business!!

September 2000C.Watters35 ACID Transaction Model  Atomic – transaction cannot be divided into sub- transactions  Consistent – transaction guarantees that data is consistent. Transaction is completed or undone. (Do no harm!)  Isolated – Transactions are not affected by concurrent transactions (locks on writes)  Durable – Effects of transactions persist (even after system crash).

September 2000C.Watters36 Recovery DBMS is responsible for guaranteeing either –a transactions is completed successfully –or –a transaction has no effect on the data or any other transaction

September 2000C.Watters37 Security and Authorization Protecting data against unauthorized access

September 2000C.Watters38 Recap E-commerce depends on DBMS Use case diagrams help define the processes E-R diagrams help define the data and relationships among data Database design must be done carefully Commercial DBMS provide backend features