1 DATABASES – I IS 524 Dr. Chandra Amaravadi. 2 IN THIS PRESENTATION.. Importance of databases Real world concepts: entities, eclasses, attributes Data.

Slides:



Advertisements
Similar presentations
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Advertisements

Data Modeling and Database Design Chapter 1: Database Systems: Architecture and Components.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Lecture-1 Database system,CSE-313, P.B. Dr. M. A. Kashem Associate. Professor. CSE, DUET,
Database Concepts Lec. 5. What Is a Database? Data are unprocessed raw facts that include text, number, images, audio, and video. Information is processed.
Information Systems Chapter 2 Organizing Data and Information.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
ETEC 100 Information Technology
Dr. Chandra Amaravadi Western Illinois University INTRO TO ENTERPRISE DATABASES - II.
1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research.
Database Management: Getting Data Together Chapter 14.
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Attribute databases. GIS Definition Diagram Output Query Results.
Databases and Database Management Systems
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 12 Information Systems. Spreadsheets Databases 12-2.
INTRO TO DATABASES Part I IS 340 BY CHANDRA S. AMARAVADI.
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.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
INTRO TO ENTERPRISE DATABASES - I Dr. Chandra Amaravadi Western Illinois University 1.
11 INTRO TO DATABASES Part I IS 340 BY CHANDRA S. AMARAVADI.
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
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.
Data-mining & Data As we used Excel that has capability to analyze data to find important information, the data-mining helps us to extract information.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
2005 SPRING CSMUIntroduction to Information Management1 Organizing Data John Sum Institute of Technology Management National Chung Hsing University.
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.
SQL Structured Query Language Programming Course.
Relational Databases (MS Access)
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
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.
CISB113 Fundamentals of Information Systems Data Management.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
Chapter 10 Database Management. Data and Information How are data and information related? p Fig Next processing data stored on disk Step.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
0 / Database Management. 1 / Identify file maintenance techniques Discuss the terms character, field, record, and table Describe characteristics.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
Fundamentals of Information Systems, Sixth Edition Chapter 3 Database Systems, Data Centers, and Business Intelligence.
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
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
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.
INTRO TO ENTERPRISE DATABASES - I
Databases Chapter 16.
Information Systems Today: Managing in the Digital World
Fundamentals & Ethics of Information Systems IS 201
Chapter 12 Information Systems.
RELATIONAL DATABASE MODEL
Databases and Information Management
Database Fundamentals
DATABASES – I IS 524 Dr. Chandra Amaravadi.
Databases and Information Management
Presentation transcript:

1 DATABASES – I IS 524 Dr. Chandra Amaravadi

2 IN THIS PRESENTATION.. Importance of databases Real world concepts: entities, eclasses, attributes Data model Organization concepts DBMS & DBMS activities and functions

NEED FOR DATABASES A church needs to maintain information on donations A church needs to maintain information on donations A consulting company needs to manage its contacts A consulting company needs to manage its contacts A doctor needs to know if a patient is allergic to a particular medication. A doctor needs to know if a patient is allergic to a particular medication. An airline exec needs to know occupancy on a flight. An airline exec needs to know occupancy on a flight. Information is managed in a database. (Needs organization) All organizations need to manage information

4 BASIC DATA CONCEPTS

5 REAL WORLD CONCEPTS Entities Entities Entity Classes Entity Classes Attributes Attributes Data models Data models Database approach/philosophy Database approach/philosophy

6 ENTITIES Individual examples of things and objects are called entities. They are modelled only as a collection.

WE ARE MORE INTERESTED IN Organization Eclasses departments customers Sales/vendor product has has eclasses Organization deals with many eclasses

8 ENTITY CLASSES HAVE PROPERTIES Properties are called attributes Departments customers Sales/vendors machines/ parts Dept. code, name, manager, budget

9 DISCUSSION Classify the following as entity, entity class or attribute John (as a person) San Francisco (as name of a city) Customer Book Store# Customs Microsoft Microsoft employees The book “The Second Machine Age” Invoice Production

10 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. SUMMARY OF CONCEPTS Eclasses & attributes are used in developing data models

11 Abstract view of the data & relationships Captures relationships between eclasses Supports DB design & implementation Relationship between students and courses? between doctors and patients? between teams and players? DATA MODELS (ER MODELS)

12 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.

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

14 THE DATA BASE APPROACH Organization Entity classes Data model File 2 File 1 Data base cust. emp.

15 BASIC ORGANIZATION CONCEPTS

16 BASIC ORGANIZATION CONCEPTS data vs information data vs information attribute attribute primary key primary key file file record record schema schema

17 DEFINING DATA Data: Data consists of raw facts e.g Are raw facts useful? meaningful? USA China Russia Great Britain Germany Japan Australia France

18 INFORMATION Information: collection of facts, data presented in a context, elaboration of data. CountryGoldSilverBronzeTotal USA China Russia Great Britain Germany Japan Australia France

19 INFORMATION AS A COLLECTION OF FACTS Collection of facts: Name: Chris Nash DOB: Profession: Engineer Address: 415 Walnut street. Details describe a person more. They are called ______

20 NOTION OF A RECORD Collection of facts is called a ________ Acct#: Date: 12/5/14 Time: 4:48 pm Merchant: WIU Union Card type: Master Card Issuer: First Bank It is actually a collection of __________ values

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

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

23 TRADITIONAL CONCEPT OF A FILE 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. A traditional file is a collection of characters Assume the following is stored somewhere,

24 Transaction ID Transaction Date Transaction Time Merchant /05/134:08 pmVitales /06/134:10 pmWIU Union CONCEPT OF A DATABASE FILE Transaction#: Date: 12/5/14 Time: 4:08 pm Merchant: Vitales Card type: Master Card Issuer: First Bank Transaction#: Date: 12/6/14 Time: 4:10 pm Merchant: WIU Union Card type: Master Card Issuer: First Bank A database file consists of _________________.

25 Primary key Record attr. values Attributes/field names Structure/schema DATABASE ORGANIZATION PROD#DESCR.PRICEQUANTITY IR888ERefrigerator$1,80020 TS3233Television$6732 Record A database is organized into ______, _________ and _______.

26 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

27 DBMS

DBMS - SW program to create, manage and provide controlled access to the data Example Access, Oracle, DB2 What can we do with a DBMS? DBMS

29 DBMS ACTIVITIES & FUNCTIONS Define structure/schema Data entry Modify data query data get reports Activities with DBMS

30 Define structure/schema DATA DEFINITION Field NameData typeDescriptionLengthDecimals Prod#NumericUnique prod code 60 DescrTextShort prod description 250 PriceCurrencyProduct price62 Attributes and data types (and other characteristics) are specified as part of data definition

31 A form is used to enter data PRODUCT DATA ENTRY Product #: Description: Label Field Heading Data entry form DATA ENTRY

32 MODIFY DATA Add Delete Change Modify data Records/field values

33 Can use QBE or SQL to query data Query by example (QBE) form QUERYING DATA -QBE prod#descr.pricequantity < 200 list products costing less than $200 list employees in finance department e_ssnenameedepte_join_dt “finance”

34 RETRIEVAL WITH SQL The structured query language can be used instead of QBE Each SELECT statement has three parts SELECT, FROM and WHERE SELECT is used to select output attributes FROM is used to specify the source tables WHERE is used for row selection criteria e.g. price < 400; zip = etc. SELECT FROM WHERE

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

36 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 UA775DFWSTL4:45 PM5:30 PM FLIGHTS ANOTHER EXAMPLE What is the result of the query?

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

38 THE THEORY OF RETRIEVAL DEPTS. EMPLOYEES have EIDeNameeAddr Jon100 Oak street 11895Carey15 Candy lane 11896Ross1317 Fox creek dCodedName dMgr Fin.FinanceJon SasSales and serviceRoss Acc.AccountsJan Emp Dept list EID, eName, dName

39 SELECTtable1.attr1, table2.attr2.... FROMtable1, table2,..... WHERE table1.fkey = table2.fkey AND/OR condition1 AND/OR ; MULTI-TABLE SELECT STATEMENT When there are multiple tables, attr. names preceded by table name. “From” will have list of tables as usual. The WHERE part will have values of common attr. equated there can be more than one condition, connected by AND or OR RULES Used to retrieve data from more than one table Using the rules above, write a query to list EID, eName, dName

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

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

42 SUMMARY OF DBMS ACTIVITIES Define structure /schema Enter data modify data query data get reports Activities with DBMS

43 D B M S Kernel 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. DBMS ARCHITECTURE

44 USEFULNESS OF DATABASES

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

46 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 Operational Usage: To analyze trends Identify sales prospects Strategic Usage:

47 DISCUSSION QUESTIONS A collection of information about machines and parts is called _____? A collection of records is called________ ? The smallest unit of data in a database is _________ ? What is QBE apart from expansion of abbreviation? How does QBE differ from SQL? What does data definition mean? Where would databases be used? How are databases used? What is a good database application?

48 THAT’S ALL FOLKS!