1 Database Management Systems Chapter 1 Introduction.

Slides:



Advertisements
Similar presentations
1 Senn, Information Technology, 3 rd Edition © 2004 Pearson Prentice Hall James A. Senns Information Technology, 3 rd Edition Chapter 7 Enterprise Databases.
Advertisements

Advanced SQL Topics Edward Wu.
Chapter 1: The Database Environment
Chapter 7 System Models.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
BASIC SKILLS AND TOOLS USING ACCESS
Relational Database and Data Modeling
Introduction to Relational Database Systems 1 Lecture 4.
1 Term 2, 2004, Lecture 9, Distributed DatabasesMarian Ursu, Department of Computing, Goldsmiths College Distributed databases 3.
Database Systems: Design, Implementation, and Management
Week 2 The Object-Oriented Approach to Requirements
Information Systems Today: Managing in the Digital World
Yong Choi School of Business CSU, Bakersfield
Microsoft Access.
Databases and Database Management Systems
Chapter Information Systems Database Management.
Chapter 10: Designing Databases
Chapter 6 Data Design.
Introduction to Databases
Executional Architecture
Stephen C. Hayne 1 Database System Components The Database and the DBMS.
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Chapter 12: Designing Databases
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
14 Databases Foundations of Computer Science ã Cengage Learning.
Management Information Systems, 10/e
© Copyright 2011 John Wiley & Sons, Inc.
Tutorial 6: normalize the following relation to 1NF, 2NF, and 3NF TransIDRentDateCustomerIDLastNamePhoneAddressVideoIDCopy#TitleRent 14/18/043Washington
Chapter 1: The Database Environment
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Jerry Post Copyright © Database Management Systems Chapter 1 Introduction.
DATABASE APPLICATION DEVELOPMENT SAK 3408 Introduction (week 1)
Database Design Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
BUSINESS DRIVEN TECHNOLOGY
Based on G. Post, Database Management Systems University of Manitoba Asper School of Business 3500 DBMS Bob Travica Updated 2015 Chapter 1 Introduction.
Chapter 1: The Database Environment
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
1 Copyright © 2010 Jerry Post. All rights reserved. Introduction to DBMS IS240 – DBMS Lecture #2 – M. E. Kabay, PhD, CISSP-ISSMP Assoc. Prof.
Chapter 1 1 © Prentice Hall, 2002 Database Design Dr. Bijoy Bordoloi Introduction to Database Processing.
Chapter 1 1 © Prentice Hall, 2002 Database Design Dr. Bijoy Bordoloi Introduction to Database Processing.
Introduction to Databases. Case Example: File based Processing Real Estate Agent’s office Property for sale or rent Potential Buyer/renter Staff/employees.
1 Copyright © 2010 Jerry Post. All rights reserved. Data Normalization (1) IS240 – DBMS Lecture # 4 – M. E. Kabay, PhD, CISSP-ISSMP Assoc. Prof.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Jerry Post Copyright © Database Management Systems Chapter 1 Introduction.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
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 ( )
Database Development and Data Normalization. 2 What is a Database and a DBMS?  Database  A collection of data stored in a standardized format, designed.
University of Manitoba Asper School of Business 3500 DBMS Bob Travica
DBSYSTEMS Chapter 3 Data Normalization Get data properly tabled! Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
Storing Organizational Information - Databases
CHAPTER 3 DATABASES AND DATA WAREHOUSES. 2 OPENING CASE STUDY Chrysler Spins a Competitive Advantage with Supply Chain Management Software Chapter 2 –
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Chapter 1 Introduction.
Database Management:.
Database Management Systems
Introduction to DBMS IS240 – DBMS Lecture #2 –
Chapter 1: The Database Environment
Database Design Hacettepe University
The Database Environment
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Presentation transcript:

1 Database Management Systems Chapter 1 Introduction

DATABASE 2 Goal: Build a Business Application Tools: Database Design SQL (queries) Programming Design SQL Program Design SQL Program Best: Worst:

DATABASE 3 DBMS: Database Management System Database A collection of data stored in a standardized format, designed to be shared by multiple users. Database Management System Software that defines a database, stores the data, supports a query language, produces reports, and creates data entry screens.

DATABASE 4 Drawbacks of old File methods Uncontrolled Duplication Wastes space Hard to update all files Inconsistent data Inflexibility Hard to change data Hard to change programs Limited data sharing Poor enforcement of standards Poor programmer productivity Excessive program maintenance

DATABASE 5 Advantages of Database Approach Minimal data redundancy. Data consistency. Integration of data. Sharing of data. Enforcement of standards. Ease of application development. Data independence.

DATABASE 6 Database Management Approach Data is most important Data defined first Standard format Access through DBMS Queries, Reports, Forms Application Programs 3GL Interface Data independence Change data definition without changing code Alter code without changing data Move/split data without changing code All Data DBMS Program1Program2 Queries Reports

DATABASE 7 Modifying Data with DBMS Add cell number to employee table Open table definition Add data element If desired, modify reports Use report writer No programming Existing reports, queries, code will all run as before with no changes. Field NameData TypeDescription EmployeeIDNumberAutonumber.. TaxpayerIDTextFederal ID LastNameText FirstNameText... PhoneText... CellPhoneTextCellular...

DATABASE 8 DBMS Components Database engine Storage Retrieval Update Query Processor Data dictionary Utilities Security Report writer Forms generator (input screens) Application generator Communications 3GL Interface

DATABASE 9 DBMS Engine, Security, Utilities Data Tables Database Engine Product ItemIDDescription 887Dog food 946Cat food Order OrderIDODate Customer CustomerID Name 1195Jones 2355Rojas Product ItemIDInteger, Unique DescriptionText, 100 char Customer CustomerIDInteger, Unique NameText, 50 char Security User Identification Access Rights Utilities Concurrency and Lock Manager Backup and Recovery Administration Data Dictionary

DATABASE 10 Database Tables (Access)

DATABASE 11 Database Tables (Oracle)

DATABASE 12 DBMS Query Processor All Data Database Engine Data Dictionary Query Processor

DATABASE 13 DBMS Report Writer All Data Database Engine Data Dictionary Query Processor Report Writer Report Format and Query

DATABASE 14 Report Writer (Oracle)

DATABASE 15 DBMS Input Forms All Data Database Engine Data Dictionary Query Processor Form Builder Input Form Design

DATABASE 16 DBMS Components All Data Database Engine Data Dictionary Security Query Processor Form Builder Report Writer Communication Network 3GL Connector Program Application Generator

DATABASE 17 Examples of Commercial Systems Oracle Ingres Informix (Unix) DB2, SQL/DS (IBM) Access (Microsoft) SQL Server (Microsoft +) Many older (Focus, IMS,...) Many limited PC (dBASE, Paradox, …)

DATABASE 18 Hierarchical Database Customers Orders ItemDescriptionQuantity 998Dog Food12 764Cat Food11 Items Customer Order Items Ordered To retrieve data, you must start at the top (customer). When you retrieve a customer, you retrieve all nested data.

DATABASE 19 Network Database Customer Order Items Ordered Items Entry point

DATABASE 20 Relational Database Customer(CustomerID, Name, … Order(OrderID, CustomerID, OrderDate, … ItemsOrdered(OrderID, ItemID, Quantity, … Items(ItemID, Description, Price, …

DATABASE 21 Why dont all developers use a DBMS? Most new projects (in last 5 years) do use a DBMS Need specialized personnel Programmers Designers/Analysts Database administrators Need to define data for organization Cost PC:$400 - $2000 Large:$100,000 +

DATABASE 22 DBMS approach Applications change a lot, but same data. Need for ad hoc questions and queries. Need to reduce development times. Need shared data. Improve quality of data. Enable users to do more development.

DATABASE 23 Database System Design User views of data. Conceptual data model. Implementation (relational) data model. Physical data storage. Class diagram that shows business entities, relationships, and rules. List of nicely-behaved tables. Use data normalization to derive the list. Indexes and storage methods to improve performance.

DATABASE 24 The Need for Design Goal: To produce an information system that adds value for the user Reduce costs Increase sales/revenue Provide competitive advantage Objective: To understand the system To improve it To communicate with users and IT staff Methodology: Build models of the system

DATABASE 25 Initial Steps of Design 1.Identify the exact goals of the system. 2.Talk with the users to identify the basic forms and reports. 3.Identify the data items to be stored. 4.Design the classes (tables) and relationships. 5.Identify any business constraints. 6.Verify the design matches the business rules.

DATABASE 26 Definitions Entity:Something in the real world that we wish to describe or track. Class: Description of an entity, that includes its attributes (properties) and behavior (methods). Object:One instance of a class with specific data. Property:A characteristic or descriptor of a class or entity. Method:A function that is performed by the class. Association:A relationship between two or more classes. Entity:Customer, Merchandise, Sales Class: Customer, Merchandise, Sale Object:Joe Jones, Premium Cat Food, Sale #32 Property:LastName, Description, SaleDate Method:AddCustomer, UpdateInventory, ComputeTotal Association:Each Sale can have only one Customer. Pet Store Examples

DATABASE 27 Associations General One-to-one(1:1) One-to-many(1:M) Many-to-many(M:N) Relationships represent business rules Sometimes common-sense Sometimes unique to an organization Users often know current relationships, rarely future Objects related to objects An employee can work in only one department Many departments can work on many different products Objects related to properties An employee can have only one name Many employees can have the same last name 1* AnimalBreed ** performs TasksEmp 1* places SaleCust. places 1* Purch. Order Supplier sent to

DATABASE 28 Why Normalization? Need standardized data definition Advantages of DBMS require careful design Define data correctly It especially makes it easier to expand database later Method applies to most models and most DBMS Similar to Entity-Relationship Goal: Define tables carefully Save space Minimize redundancy Protect data

DATABASE 29 Definitions Relational database: A collection of tables. Table: A collection of columns (attributes) describing an entity. Individual objects are stored as rows of data in the table. Property (attribute): a characteristic or descriptor of a class or entity. Every table has a primary key. The smallest set of columns that uniquely identifies any row Primary keys can span more than one column (concatenated keys) We often create a primary key to insure uniqueness (e.g., CustomerID, Product#,...) called a surrogate key. EmployeeIDTaxpayerIDLastNameFirstNameHomePhoneAddress CartomAbdul(603) South Street VenetiaanRoland(804) Paramaribo Lane JohnsonJohn(703) Main Street StenheimSusan(410) W. Maple Employee Properties Rows/Objects Class: Employee Primary key

DATABASE 30 First Normal Form Problems (Data) TransIDRentDateCustIDPhoneLastNameFirstNameAddressCityStateZipCode 14/18/ WashingtonElroy95 Easy StreetSmith's GroveKY /30/ LasaterLes67 S. Ray DrivePortlandTN /18/ JonesCharlie867 Lakeside DriveCastalian SpringsTN /18/ WashingtonElroy95 Easy StreetSmith's GroveKY42171 TransIDVideoIDCopy#TitleRent : A Space Odyssey$ Clockwork Orange$ Hopscotch$ Apocalypse Now$ Clockwork Orange$ Luggage Of The Gods$ Fabulous Baker Boys$ Boy And His Dog$ Blues Brothers$ Hopscotch$ Surf Nazis Must Die$ Witches of Eastwick$2.00 1NF splits repeating groups Still have problems Replication Hidden dependency: If a video has not been rented yet, then what is its title?

DATABASE 31 Second Normal Form Definition Each non-key column must depend on the entire key. Only applies to concatenated keys Some columns only depend on part of the key Split those into a new table. Dependence (definition) If given a value for the key you always know the value of the property in question, then that property is said to depend on the key. If you change part of a key and the questionable property does not change, then the table is not in 2NF. RentalLine(TransID, VideoID, Copy#, Title, Rent) Depend only on VideoID Depends on both TransID and VideoID

DATABASE 32 Second Normal Form Example Title depends only on VideoID Each VideoID can have only one title Rent depends on VideoID This statement is actually a business rule. It might be different at different stores. Some stores might charge a different rent for each video depending on the day (or time). Each non-key column depends on the whole key. RentalLine(TransID, VideoID, Copy#, Title, Rent) VideosRented(TransID, VideoID, Copy#) Videos(VideoID, Title, Rent)

DATABASE 33 Second Normal Form Example (Data) TransIDVideoIDCopy# VideoIDTitleRent 12001: A Space Odyssey$1.50 2Apocalypse Now$2.00 3Blues Brothers$2.00 4Boy And His Dog$2.50 5Brother From Another Planet$2.00 6Clockwork Orange$1.50 7Gods Must Be Crazy$2.00 8Hopscotch$1.50 VideosRented(TransID, VideoID, Copy#) Videos(VideoID, Title, Rent) RentalForm2(TransID, RentDate, CustomerID, Phone, Name, Address, City, State, ZipCode) (Unchanged)

DATABASE 34 Third Normal Form Definition RentalForm2(TransID, RentDate, CustomerID, Phone, Name, Address, City, State, ZipCode) Each non-key column must depend on nothing but the key. Some columns depend on columns that are not part of the key. Split those into a new table. Example: Customers name does not change for every transaction. Dependence (definition) If given a value for the key you always know the value of the property in question, then that property is said to depend on the key. If you change the key and the questionable property does not change, then the table is not in 3NF. Depend only on CustomerID Depend on TransID

DATABASE 35