Chapter 1Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Management Information Systems, Sixth Edition
Accounting System Design
Client/Server Databases and the Oracle 10g Relational Database
Concepts of Database Management Sixth Edition
1 A GUIDE TO ORACLE8 CHAPTER 1: Introduction to Client/Server Databases 1.
The Relational Database Model:
3-1 Chapter 3 Data and Knowledge Management
Client/Server Databases and the Oracle9i Relational Database
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Information Technology in Organizations
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Concepts of Database Management Seventh Edition
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
MS Access 2007 IT User Services - University of Delaware.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Chapter 3 The Relational Model and Normalization
Chapter 1 Overview of Database Concepts
Chapter 5 Database Processing.
© Abdou Illia MIS Spring 2015
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2012 (September 5, 2012)
ASP.NET Programming with C# and SQL Server First Edition
CSC271 Database Systems Lecture # 4.
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
Database Technical Session By: Prof. Adarsh Patel.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Concepts and Terminology Introduction to Database.
2005 SPRING CSMUIntroduction to Information Management1 Organizing Data John Sum Institute of Technology Management National Chung Hsing University.
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.
6 Chapter Databases and Information Management. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
1 Client/Server Databases and the Oracle Relational Database.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 12: Designing Databases
Enhanced Guide to Oracle8i
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
1 Introduction to Oracle Chapter 1. 2 Before Databases Information was kept in files: Each field describes one piece of information about student Fields.
Database revision.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Managing Data Resources. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits that represents a single.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
Chapter 2 Database Environment.
Microsoft Access 2010 Chapter 11 Database Design.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
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.
Client/Server Databases and the Oracle 10g Relational Database
Chapter 4 Relational Databases
MANAGING DATA RESOURCES
Presentation transcript:

Chapter 1Oracle9i: SQL1 Chapter 1 Overview of Database Concepts

Chapter 1Oracle9i: SQL2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a record and a column from a row Identify the basic components of an Entity- Relationship Model Define the three types of relationships that can exist between entities

Chapter 1Oracle9i: SQL3 Chapter Objectives Explain the purpose of normalization Describe the role of a primary key Identify partial dependency and transitive dependency in the normalization process

Chapter 1Oracle9i: SQL4 Chapter Objectives Explain the purpose of a foreign key Determine how to link data in different tables through the use of a common field Explain the purpose of a structured query language (SQL)

Chapter 1Oracle9i: SQL5 Database Terminology Database – logical structure to store data Database Management System (DBMS) – software used to create and interact with the database

Chapter 1Oracle9i: SQL6 Database Components Bit (0 or 1) is the smallest data unit. A few bits (usually 8) can be organized into a byte. Each byte represents a character that is the basic building block of information. Field Record File

Chapter 1Oracle9i: SQL7 Database Components - Character Basic unit of data Can be a letter, number, or special symbol

Chapter 1Oracle9i: SQL8 Database Components - Field A group of related characters Represents an attribute or characteristic of an entity Corresponds to a column in the physical database

Chapter 1Oracle9i: SQL9 Database Components - Record A collection of fields for one specific entity Corresponds to a row in the physical database

Chapter 1Oracle9i: SQL10 Database Components - File A group of records about the same type of entity File (a table)Field AField BField C…….. Record 1 Record 2 Record 3 Record 4 …….

Chapter 1Oracle9i: SQL11 What Are Relations A Relational DB is a collection of relations A relation is a two-dimensional table that has the following characteristics –Rows contain data about an entity –Columns contain data about attributes of the entity –Cells of the table hold a single value –Each column has a unique name –The order of the columns is unimportant –The order of the rows is unimportant –No two rows may be identical

Chapter 1Oracle9i: SQL12 What Are Relations Interchangeably Used Terms in Relational Database –table = file = relation –row = record= tuple –column = field = attribute

Chapter 1Oracle9i: SQL13 Components Example

Chapter 1Oracle9i: SQL14 The Customers File/Table/Relation CUSTOMERS NameAddressCityState……. Customer AJohn123 5 th St.HuntsvilleAL……. Customer B…………….…………….……. Customer C Customer D …….

Chapter 1Oracle9i: SQL15 Review of Database Design Systems Development Life Cycle (SDLC) Entity-Relationship Model (E-R Model) Normalization

Chapter 1Oracle9i: SQL16 Systems Development Life Cycle (SDLC) 5 Phases Systems investigation – understanding the problem Systems analysis – understanding the solution Systems design – creating the logical and physical components

Chapter 1Oracle9i: SQL17 Systems Development Life Cycle (SDLC) Systems implementation – placing completed system into operation Systems maintenance and review – evaluating the implemented system

Chapter 1Oracle9i: SQL18 Entity-Relationship Model (E-R Model) Used to depict the relationship that exists among entities. Entity Definitions –An object of interest to the business –A class or category of thing –A named thing or a thing of significance about which the business needs information –Entity instance is the representation of a particular entity. Attribute is a characteristic of an entity.

Chapter 1Oracle9i: SQL19 Entities: Examples COURSE STUDENT INSTRUCTOR code name fee length name phone no. name phone no

Chapter 1Oracle9i: SQL20 E-R Model Symbols

Chapter 1Oracle9i: SQL21 Relationships: An Example taken by enrolled in STUDENT COURSE Each STUDENT may be enrolled in one or more COURSES Each COURSE may be taken by one or more STUDENTS

Chapter 1Oracle9i: SQL22 Relationships The following relationships can be included in an E-R Model: –One-to-one –One-to-many –Many-to-many

Chapter 1Oracle9i: SQL23 One-to-one Relationship Each occurrence of data in one entity is represented by only one occurrence of data in the other entity Example: Each individual has just one Social Security Number (SSN) and each SSN is assigned to just one person

Chapter 1Oracle9i: SQL24 One-to-many Relationship Each occurrence of data in one entity can be represented by many occurrences of the data in the other entity Example: A class has only one instructor, but each instructor can teach many classes

Chapter 1Oracle9i: SQL25 Many-to-many Relationship Data can have multiple occurrences in both entities Example: A student can take many classes and each class is composed of many students Can not be included in the physical database

Chapter 1Oracle9i: SQL26 Relationship Types: More Examples Many-to-One One-to-One Many-to-Many

Chapter 1Oracle9i: SQL27 Many-to-One Relationships CUSTOMER SALES REPRESENTATIVE assigned to visited by

Chapter 1Oracle9i: SQL28 Many-to-Many Relationships PATIENT HEALTH CARE WORKER assigned to attended by

Chapter 1Oracle9i: SQL29 One-to-One Relationships BICYCLERIDER the rider is ridden by

Chapter 1Oracle9i: SQL30 Entity-Relationship Model An entity is usually represented as a square or rectangle. A line between two entities depict their relationships (a dashed line for optional relationship) –One-to-one: straight line –One-to-many: a straight line with a “crowfoot” at the “many” end. –Many-to-many: a straight line with a “crowfoot” at each end.

Chapter 1Oracle9i: SQL31 Example E-R Model

Chapter 1Oracle9i: SQL32 Normalization Determines required tables and columns for each table Multi-step process. Application of a series of rules that gradually improve the design Used to reduce or control data redundancy

Chapter 1Oracle9i: SQL33 Unnormalized Data Contains repeating groups in the Author column in the BOOKS table

Chapter 1Oracle9i: SQL34 First-Normal Form (1NF) Primary key is identified –Primary key is a field or a set of fields (composite PK) that serve to uniquely identify each record in a table. e.g. the SSN field in a table that contains students’ record. Repeating groups are eliminated. Single valued attributes only

Chapter 1Oracle9i: SQL35 Primary Keys Primary key –Value must be unique for each record –Serves to identify the record –Present in every record –Can’t be NULL –Usually numeric

Chapter 1Oracle9i: SQL36 Candidate Keys Candidate key –Any field that could be used as the primary key –Should be a unique, unchanging numeric field

Chapter 1Oracle9i: SQL37 Surrogate Keys Surrogate key: created to be the record’s primary key identifier when no suitable primary key exists Surrogate key has no real relationship to the record to which it is assigned, other than to identify the record uniquely Developers configure the database to generate surrogate key values automatically Surrogate keys are always numerical fields

Chapter 1Oracle9i: SQL38 Foreign Keys Foreign key: a field in a table that is a primary key in another table Foreign key creates a relationship between the two tables Foreign key value must exist in the table where it is a primary key

Chapter 1Oracle9i: SQL39

Chapter 1Oracle9i: SQL40 Composite Keys Composite key: a unique key that you create by combining two or more fields Usually comprised of fields that are primary keys in other tables

Chapter 1Oracle9i: SQL41 First-Normal Form (1NF) ISBN and Author columns together create a composite primary key

Chapter 1Oracle9i: SQL42 Composite Key-P.D. More than one column is required to uniquely identify a row Can lead to partial dependency - a column is only dependent on a portion of the primary key

Chapter 1Oracle9i: SQL43 Second-Normal Form (2NF) Partial dependency must be eliminated –Break the composite primary key into two parts, each part representing a separate table

Chapter 1Oracle9i: SQL44 Second-Normal Form (2NF) BOOKS table in 2NF

Chapter 1Oracle9i: SQL45 Third-Normal Form (3NF) Publisher contact name has been removed

Chapter 1Oracle9i: SQL46 Summary of Normalization Steps 1NF: eliminate repeating groups, identify primary key 2NF: table is in 1NF and partial dependencies eliminated 3NF: table is in 2NF and transitive dependencies eliminated

Chapter 1Oracle9i: SQL47 Linking Tables Once tables are normalized, make certain tables are linked Tables are linked through a common field A common field is usually a primary key in one table and a foreign key in the other table A foreign key is a column that is a primary key of another table

Chapter 1Oracle9i: SQL48 Linking Tables For every value of a foreign key there is a primary key with that value A foreign key can never be null A primary key must exist before the foreign key can be defined

Chapter 1Oracle9i: SQL49

Chapter 1Oracle9i: SQL50 JustLee Books’ Database Assumptions –No back orders or partial shipments –Only US addresses –Shipped orders are purged (deleted) at the end of the month

Chapter 1Oracle9i: SQL51 Structured Query Language (SQL) and DBMS Data sublanguage Structured Query Language (SQL) is a data sublanguage that has constructs for defining and processing a database It can be –Used stand-alone within a DBMS command –Embedded in triggers and stored procedures –Used in scripting or programming languages All DBMS use some variation of the standardized ANSI-SQL. (Oracle SQL Plus)

Chapter 1Oracle9i: SQL52 Structured Query Language (SQL) and DBMS SQL was developed by IBM in late 1970s SQL-92 was endorsed as a national standard by ANSI in 1992 Data Definition Language (DDL) is used to define database structures Data Manipulation Language (DML) is used to query and update data DBMS: Database Management System Examples of DBMS: Oracle, DB2, Microsoft Access, SQL Server

Chapter 1Oracle9i: SQL53 Client/Server DBMS Client/server database Takes advantage of distributed processing and networked computers by distributing processing across multiple computers DBMS server process runs on one workstation, and the database applications run on separate client workstations across the network

Chapter 1Oracle9i: SQL54 Client/Server DBMS Preferred for database applications that retrieve and manipulate small amounts of data from databases containing large numbers of records because they minimize network traffic and improve response times Organizations generally use a client/server database if the database will have more than 10 simultaneous users and if the database is mission critical

Chapter 1Oracle9i: SQL55 Client/Server Database Architecture

Chapter 1Oracle9i: SQL56 The Oracle9i Client/Server Database All Oracle server- and client-side programs use Oracle Net, a utility that enables the network communication between the client and the server

Chapter 1Oracle9i: SQL57 Oracle DBMS Oracle is the world’s most popular DBMS It is a powerful and robust DBMS that runs on many different operating systems Oracle DBMS engine: Personal Oracle and Enterprise Oracle Example of Oracle products –SQL*Plus: a utility for processing SQL and creating components like stored procedures and triggers

Chapter 1Oracle9i: SQL58 Oracle SQL *Plus Oracle SQL*Plus or the Oracle Enterprise Manager Console may be used to manage an Oracle database SQL*Plus is a text editor available in all Oracle Case-insensitive The semicolon (;) terminates a SQL statement The right-leaning slash (/) executes SQL statement stored in Oracle buffer