INTRO TO DATABASES Part I IS 340 BY CHANDRA S. AMARAVADI.

Slides:



Advertisements
Similar presentations
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Lecture-1 Database system,CSE-313, P.B. Dr. M. A. Kashem Associate. Professor. CSE, DUET,
Advertisements

Chapter 12 Information Systems Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Dr. Chandra Amaravadi Western Illinois University INTRO TO ENTERPRISE DATABASES - II.
Database Management An Introduction.
Organizing Data Chapter 5. Data Hierachy Table = Entities X Attributes Entities = Records Attributes = Fields.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
CHAPTER 3 DATABASES AND DATA WAREHOUSES. 3-2 STUDENT LEARNING OUTCOMES 1.Describe business intelligence and its role 2.Compare databases and data warehouses.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
BUSINESS DRIVEN TECHNOLOGY
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Database Software Application
Transaction Processing Systems, & Management Information Systems.
Chapter 12 Information Systems. Spreadsheets Databases 12-2.
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
Introduction to Databases. Overview  What is a Database?  What is a Database Management System?  How is information organized in a database?  What.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
ADVANCED DATABASES WITH ORACLE 11g FOR ADDB7311 LEARNING UNIT 1 of 7.
1 Introduction to databases concepts CCIS – IS department Level 4.
Introduction to Databases
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.
Module Title? DBMS Introduction to Database Management System.
11 INTRO TO DATABASES Part I IS 340 BY CHANDRA S. AMARAVADI.
Introduction to SQL Steve Perry
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
Introduction to Microsoft Access Overview 1. Introduction What is Access? A relational database management system What is a Relational Database? Organized.
Relational Databases (MS Access)
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Storing Organizational Information - Databases
Databases. What is a database?  A database is used to store data. The word DATA is actually Latin for FACTS. A database is, therefore, a place, or thing.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 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 –
CS 1308 Computer Literacy and the Internet
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Chapter 3 Databases and Data Warehouses: Building Business Intelligence Copyright © 2010 by the McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
IST 220 – Intro to Databases Lecture 2 Touring Microsoft Access.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
1 DATABASES – I IS 524 Dr. Chandra Amaravadi. 2 IN THIS PRESENTATION.. Importance of databases Real world concepts: entities, eclasses, attributes Data.
Presentation on Database management Submitted To: Prof: Rutvi Sarang Submitted By: Dharmishtha A. Baria Roll:No:1(sem-3)
DATABASE EVOLUTION & ENVIRONMENT Chandra S. Amaravadi.
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Databases Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
©Silberschatz, Korth and Sudarshan 1.1 Database System Concepts قواعد البيانات Data Base قواعد البيانات CCS 402 Mr. Nedal hayajneh E- mail
1 Management Information Systems M Agung Ali Fikri, SE. MM.
CHAPTER 1: INTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Storage Management Database.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
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.
IST 220 – Intro to Databases
INTRO TO ENTERPRISE DATABASES - I
Chapter 1: Introduction
Fundamentals of Information Systems
RELATIONAL DATABASE MODEL
Databases and Information Management
Database Fundamentals
DATABASES – I IS 524 Dr. Chandra Amaravadi.
Databases and Information Management
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Presentation transcript:

INTRO TO DATABASES Part I IS 340 BY CHANDRA S. AMARAVADI

2 IN THIS PRESENTATION.. Entity classes, entities, attributes Database organization file, record, attribute/field DBMS activities and functions DBMS components Importance of databases

NEED FOR DATABASES  A church needs to maintain information on donations  A consulting company needs to manage its contacts  A doctor needs to know if a patient is allergic to a particular medication.  An airline exec needs to know occupancy on a flight.

4 BASIC DATA CONCEPTS

5 THERE ARE THINGS AND OBJECTS IN THE REAL WORLD These are called entities.

WE ARE MORE INTERESTED IN Organization Eclasses Produce customers Sales/vendors machines/ parts

7 ENTITY CLASSES HAVE PROPERTIES Properties are called attributes Produce customers Sales/vendors machines/ parts Barcode#, price per unit, supplier, total qty

8 DISCUSSION Classify the following as entity, entity class or attribute John San Francisco (as a city) Customer Book Store# Nintendo DS Microsoft Microsoft employees The book “Great Expectations” Invoice Production

9 BASIC ORGANIZATION CONCEPTS

10 DATA VS INFORMATION Data about an entity are raw facts. Are they useful? December 30 th, 1984 Played for Cavs and Heat Born March 28 th, m albums sold Car driven by Bobby Redhall

11 INFORMATION IS USEFUL IF COMPLETE Example information about a person Name: Chris Nash DOB: Profession: Engineer Address: 415 Walnut street. This describes a person more. It is called ????.

12 ANOTHER EXAMPLE Example information about a credit card transaction: Acct#: Date: 12/5/08 Time: 4:48 pm Merchant: WIU Union Card type: Master Card Issuer: First Bank This describes a transaction more.

13 ONE ATTRIBUTE HAS A UNIQUE VALUE Which of these has a unique value? Acct#: Date: 12/5/08 Time: 4:48 pm Merchant: WIU Union Card type: Master Card Issuer: First Bank The unique attribute is called ???

14 ORGANIZATION OF DATA/ INFORMATION Transaction#: Date: 12/5/10 Time: 4:08 pm Merchant: Vitales Card type: Master Card Issuer: First Bank Transaction#: Date: 12/6/10 Time: 4:10 pm Merchant: WIU Union Card type: Master Card Issuer: First Bank Observations about these two “units” of data?

15 TRADITIONAL CONCEPT OF A FILE CBT QUALITY MANAGEMENT COMMITTEE Meeting Minutes Meeting Date/time: December 2nd, 2:00 p.m. Present: Larry Wall, Ken Nimrick, Xiang Yi, Western Illinois University strives to maintain a community which values academic excellence; institutional integrity; and justice, equity, and diversity. Such an environment is essential in fostering the intellectual growth and personal development of all students. Each member of the University community shares responsibility in maintaining conditions which support the University's purpose. The Code of Student Conduct is designed to provide basic guidelines to advance the University's mission as a premier educational institution.

16 Transaction ID Transaction Date Transaction Time Merchant /05/094:08 pmVitales /05/094:10 pmWIU Union CONCEPT OF A DATABASE FILE

17 DEFINITIONS

18 Primary key Record attr. values Attributes/field names Structure/schema DATABASE ORGANIZATION PROD#DESCR.PRICEQUANTITY IR888ERefrigerator$1,80020 TS3233Television$6732 Record

19 Database – A group of related files File/table – A group of related records Record – a grouping of related field values Attribute – property e.g. hair color Schema -- This is the logical view of the database (tables and fields) Primary key – An attribute whose values are unique within a file Secondary key – Any other attribute DBMS – software program to provide controlled data access Database Files/tables Records Attr. values DATABASE ORGANIZATION

20 DATA MODELS AND DBMS MODELS

21 Organization Entity classes Data model File 2 File 1 Data base cust. emp.

22 DATA MODELS Abstract view of the data & relationships Captures data needs Supports implementation Relationship between students and courses? between doctors and patients? between teams and players?

23 DEFINITIONS Entity – Individual example of person, place or thing. Entity Class – Collection of related entities. Attributes – Properties of entity classes about which we would like to collect information.

24 DATA MODELS… Three types of relationships among entity classes A B 1:1 A B 1:M A B M:N For each value of A, one and only one value of B and vice versa. For each value of A, many values of B, but for each B only one A. For each value of A, many values of B and vice versa.

25 DISCUSSION Identify the types of the following relationships l Company -- president l Instructor -- students l Flights -- pilots l City -- convention centers l Club -- members l Team -- players l Company -- city l Books – authors l Artists -- records

26 DBMS ACTIVITIES

27 DBMS ACTIVITIES & FUNCTIONS Activities with DBMS Define structure/schema Enter data modify data query data get reports

28 Define structure/schema DBMS ACTIVITIES & FUNCTIONS Field NameData typeDescriptionLengthDecimals Prod#NumericUnique prod code 60 DescrTextShort prod description 250 PriceCurrencyProduct price62 This is called data definition

29 Enter data -- Create a data entry form PRODUCT DATA ENTRY Product #: Description: Label Field Heading Data entry form DBMS ACTIVITIES & FUNCTIONS

30 DBMS ACTIVITIES & FUNCTIONS Add Delete Change Modify data Records/field values

31 DBMS ACTIVITIES.. Database Retrieval

32 Query data – can use QBE or SQL list products costing more than $2,000 Query by example (QBE) form DBMS ACTIVITIES & FUNCTIONS Prod#Descr.PriceQuantity > 2,000

33 DATABASE RETRIEVAL THE STRUCTURED QUERY LANGUAGE u Each SELECT statement has three parts u SELECT, FROM and WHERE u SELECT is used to select output attributes u FROM is used to specify the tables u WHERE is used for row selection criteria SELECT FROM WHERE

34 Flt#PnameConfirm# AA1802SmithPA5R2 PA802SmithLX5R2 UA3702MahoneyZB46A Select Flt#, Confirm# From Reservation Where Pname = “Smith”; Reservation DATABASE RETRIEVAL.. SQL QUERY RESULT Flt# Confirm# AA1802 PA5R2 PA802 LX5R2

35 SELECT Flt#, Deptime, Arrtime FROM ?? WHERE Depcity = "PHX" and Destcity = "ORD"; Flt #DepcityDestcityDeptimeArrtime AA 802PHXORD1:51 AM6:05AM UA 3702COSD7:35 AM8:05 AM AA 812PHXSEA4:55 AM9:00 AM D 42PHXORD5:40 PM9:15PM FLIGHTS ANOTHER EXAMPLE What is the result of the query?

36 DISCUSSION Write SQL queries to list: 1) employee names. 2) Employees who live in Macomb. 3) employees who enjoy soccer. EIDE_nameE_addr.E_city 423Smith100 Oak laneMacomb 425Smith100 Oak laneMacomb 501Johnson1430 N. Park streetRock Island EMP.

37 THE THEORY OF RETRIEVAL DEPTS. EMPLOYEES have EIDE_nameE_addr Jon100 Oak street 11895Carey15 Candy lane 11896Ross1317 Fox creek D_codeD_name D_mgr Fin.FinanceJon SasSales and serviceRoss Acc.AccountsJan Emp. file Dept. file

38 SELECTtable1.attr1, table2.attr2.... FROMtable1, table2,..... WHEREtable1.fkey = table2.fkey AND/OR condition1 AND/OR ; MULTI-TABLE SELECT STATEMENT NOTE l When there are multiple tables, attr. names preceded by table name l The values of common attr. need to be equal in the WHERE part l There can be more than one condition, connected by AND or OR

39 RH PH Detail Fields PF RF PRODUCT LISTING PRODUCT #DESCR.PRICE Product #Descr. Price Average Price Title Column Headings Footer A report specification

40 GETTING DATA OUT.. PRODUCT LISTING PROD# DESCRIPTION PRICE M100 Chair $ M150 Table $ Average Price $ A generated report

41  Define structure /schema  Enter data  modify data  query data  get reports Activities with DBMS

42 DBMS ORGANIZATION

D B M S Kernel Major Components of DBMS Export/Import Data Defn. Data Defn. SQL Prog. Language Interface Prog. Language Interface Data Diction- ary Data Diction- ary Screen/ Report Gen. Screen/ Report Gen. Appln. Gen. Appln. Gen. 43

DBMS COMPONENTS.. Data definition – the facility through which schema is defined. (how new tables are created). SQL interface – the facility through which SQL commands are typed in. Programming language interface – the facility which processes SQL commands embedded in application program. Also known as the host language interface. Data dictionary – the facility that records details about the schema, reports, data entry forms etc. Screen & reports- the facility through which data entry screens and reports are created. Appln. Generation- the facility through which applications are created. Export/Import -- the facility through which files can be imported/exported in different DBMS formats. DBMS Kernel -- the actual programs which interact with the O/S and carry out data I/O. 44

45 USEFULNESS OF DATABASES

46 Suppose we have detailed information on each and every transaction in a store, what can we do with that? What if a customer wants to return a shirt purchased in the store? What if a manager wants to know what products were sold on a particular day? USAGE OF DATA/INFORMATION

47  To store and record information e.g. bal, price, grades etc.  To retrieve information e.g. check#432 cashed?  To report information e.g. daily sales  To answer queries e.g. how many shoes were sold? IMPORTANCE OF DBMS’s Databases are used:  To analyze trends  Identify sales prospects Advanced uses:

48 THAT’S ALL FOLKS!