Chapter 1 Overview of Database Concepts Oracle 10g: SQL

Slides:



Advertisements
Similar presentations
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Management Information Systems, Sixth Edition
Client/Server Databases and the Oracle 10g Relational Database
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Database Management: Getting Data Together Chapter 14.
Concepts of Database Management Sixth Edition
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
Chapter 3: Data Modeling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
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.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
IST Databases and DBMSs Todd S. Bacastow January 2005.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Chapter 1 Overview of Database Concepts
Chapter 5 Database Processing.
Chapter 5 Normalization of Database Tables
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
2.3 Organising Data for Effective Retrieval
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 3 Objectives: Identifying and Eliminating Database.
Concepts of Database Management Seventh Edition
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 1Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Database Technical Session By: Prof. Adarsh Patel.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
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 of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Concepts and Terminology Introduction to Database.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
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.
Database Systems: Design, Implementation, and Management Tenth Edition
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Storing Organizational Information - Databases
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Chapter 4 Database Processing Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 4-1.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Fanny Widadie, S.P, M.Agr 1 Database Management Systems.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
Database Fundamentals CSC105 Furman University Peggy Batchelor.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
IS 320 Notes for April 15, Learning Objectives Understand database concepts. Use normalization to efficiently store data in a database. Use.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Database Planning Database Design Normalization.
1 Management Information Systems M Agung Ali Fikri, SE. MM.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Client/Server Databases and the Oracle 10g Relational Database
Chapter 4 Relational Databases
Database Design Chapter 7.
Presentation transcript:

Chapter 1 Overview of Database Concepts Oracle 10g: SQL This chapter introduces basic database terminology and discusses the process of designing JustLee Books’ database, which is used during this course.

Objectives Define database terms Identify the purpose of a database management system (DBMS) Explain database design using entity-relationship models and normalization Explain the purpose of a Structured Query Language (SQL) Understand how this textbook’s topics are sequenced and how the two sample databases are used After completing this chapter, students should be able to: Oracle 10g: SQL

Database Terminology Database – logical structure to store data Database management system (DBMS) – software used to create and interact with the database Database is a logical structure used to store data. The database is a single, large repository of data, which can be used simultaneously by many departments and users in a company. Database management system is a software that interacts with the users, application programs, and the database. Oracle 10g: SQL

Database Components Character Field Record File Oracle 10g: SQL Four components of a database are character, field, record, and file. Oracle 10g: SQL

Database Components - Character Basic unit of data Can be a letter, number, or special symbol In a database, the basic unit of data is a character. A character can be a letter, number, or a special symbol. A space between words is also stored as a character. Oracle 10g: SQL

Database Components - Field A group of related characters Represents an attribute or characteristic of an entity Corresponds to a column in the physical database A group of related characters is called field, which also called column or attribute. Oracle 10g: SQL

Database Components - Record A collection of fields for one specific entity Corresponds to a row in the physical database A collection of fields about one entity is called record, also called row, or tuple. Oracle 10g: SQL

Database Components - File A group of records about the same type of entity A group records about the same type of entity is stored in a file, which also called table. Some examples for entity are customer, student, purchase order, inventory. A collection of related files, such as customer file, purchase order file, inventory file, is stored in a database. Oracle 10g: SQL

Components Example Oracle 10g: SQL This is an example of the customer’s information creating data fields and a record and then becoming part of a file. Whenever a customer opens an account with a company, certain data must be collected. This is very similar to registering yourself online with an online store or service. Oracle 10g: SQL

Database Example Oracle 10g: SQL A file or table is similar to a spreadsheet in that it contains columns and rows. This picture shows a representation of these four terms and where they are placed in a database. Oracle 10g: SQL

Database Management System Data storage: manage the physical structure of the database Security: control user access and privileges Multiuser access: manage concurrent data access Backup: enable recovery options for database failures Data access language: provide a language that allows database access Data integrity: enable constraints or checks on data Data dictionary: maintain information about database structure A database management system is used to create and maintain the structure of a database, and then to enter, manipulate, and retrieve the data it stores. Creating an efficient database design is the key to effectively using a database to support an organization’s business operations. Oracle 10g: SQL

Database Design Systems Development Life Cycle (SDLC) Entity-Relationship Model (E-R Model) Normalization The structure of the database is determined during database design. However, carrying out a database design can be extremely complex. To produce a system that will satisfy the company’s information needs requires a data-driven approach, which means we think of the data first and the application second. The design and development of a system is accomplished through a series of steps. The process is formally called the Systems Development Life Cycle. Oracle 10g: SQL

Systems Development Life Cycle (SDLC) Systems investigation – understanding the problem Systems analysis – understanding the solution Systems design – creating the logical and physical components Systems implementation – placing completed system into operation Systems maintenance and review – evaluating the implemented system The systems development life cycle is a common methodology for systems development in many organizations. It marks the phases or steps of information systems development. Every organization may use a slightly different life cycle model to model these steps, with anywhere from three to twenty identifiable steps. The main steps of SDLC are investigation, analysis, design, implementation, and maintanence. Oracle 10g: SQL

Entity-Relationship Model (E-R Model) Used to represent the relationship that exists among entities Model symbols: In an ER model, an entity is usually represented as a square or rectangle. As shown here, a line represents how an entity’s data relates to another entity. Solid lines mean the relationship between two entities is mandatory; and a dashed line represents the relationship is optional. Oracle 10g: SQL

Relationships The following relationships can be included in an E-R Model: One-to-one One-to-many Many-to-many There are three types of relationships: one-to-one, one-to-many, and many-to-many. Oracle 10g: SQL

E-R Model Notation Examples Some examples of ER model notation. Oracle 10g: SQL

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 One-to-one relationships occur when there is exactly one record in the first table that corresponds to exactly one record in the related table. First example for one-to-one relationship is person and ssn. Each person has only one ssn; which can be considered as a mandatory one-to-one relationship. Another example is driver license and person. Again each person may have one driver license; however, this cannot be mandatory; this is optional one-to-one relationship. Oracle 10g: SQL

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 One-to-many relationships occur when each record in TableA may have many linked records in TableB; but each record in TableB may have only one corresponding record in TableA. Another example for one-to-many relationship can be mother-child relationship. A mother can have many children, but a child can have only one mother. Oracle 10g: SQL

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 Many-to-many relationships occur when each record in TableA may have many linked records in TableB and vice-versa. Another example can be found in relationships between actors and movies. An actor can play in many movies and a movie can have many actors played in it. Oracle 10g: SQL

Example E-R Model Oracle 10g: SQL This picture shows simplified ER model for the database—JustLee Books—used in this book. There are five entities—customers, orders, books, author, and publisher. Oracle 10g: SQL

Database Normalization Determines required tables and columns for each table Multi-step process Used to reduce or control data redundancy Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) ensuring data dependencies (only storing related data in a table). Oracle 10g: SQL

Database Normalization (continued) Data redundancy - Refers to having the same data in different places within a database Data anomalies - Refers to data inconsistencies Normalization may reduce the amount of space a database consumes and ensures that data is logically stored. In the example shown here, customer information is repeated for each order that a customer places (redundancy). Also, the city data in the last row is different from the first two rows. Oracle 10g: SQL

Unnormalized Data Contains repeating groups in the Author column in the BOOKS table Why not just put all the data in one big table? This single table approach leads to problems of data redundancy (duplication) and data anomalies (data inconsistencies). Oracle 10g: SQL

First-Normal Form (1NF) Primary key is identified Repeating groups are eliminated First normal form (1NF) sets the very basic rules for an organized database: Eliminate duplicative columns from the same table. Create separate tables for each group of related data and identify each row with a unique column or set of columns. Oracle 10g: SQL

First-Normal Form (1NF) (continued) ISBN and Author columns together create a composite primary key In this figure, the repeating values of authors’ names is eliminated. Each row now contains no more than one data value. Oracle 10g: SQL

Composite Primary Key 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 When more than one field is used as the primary key for a table, the combination of fields is usually referred to as a composite primary key. Oracle 10g: SQL

Second-Normal Form (2NF) Partial dependency must be eliminated Break the composite primary key into two parts, each part representing a separate table Second normal form (2NF) further addresses the concept of removing duplicative data: Meet all the requirements of the first normal form. Remove subsets of data that apply to multiple rows of a table and place them in separate tables. Create relationships between these new tables and their predecessors through the use of foreign keys. Oracle 10g: SQL

Second-Normal Form (2NF) (continued) BOOKS table in 2NF After eliminating partial dependency, the Books table is in 2NF. Oracle 10g: SQL

Third-Normal Form (3NF) Publisher contact name has been removed Third normal form (3NF) goes one large step further: Meet all the requirements of the second normal form. Remove columns that are not dependent upon the primary key. Oracle 10g: SQL

Summary of Normalization Steps 1NF: eliminate repeating groups, identify the primary key 2NF: table is in 1NF and partial dependencies are eliminated 3NF: table is in 2NF and transitive dependencies are eliminated Oracle 10g: SQL

Relating Tables within the Database 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 After each table has been normalized, make certain all relationships among the tables have been established. Oracle 10g: SQL

This picture shows the JustLee Book’s table structures after normalization. Please note that the underlined fields in each table indicates the primary key for that particular table. Oracle 10g: SQL

Structured Query Language (SQL) Data sublanguage Used to: Create or modify tables Add data to tables Edit data in tables Retrieve data from tables ANSI and ISO standards SQL is not considered a programming language, such as COBOL or Java. It is a data sublanguage. It is not procedural and it processes sets of data as groups. Oracle 10g: SQL

Databases used in this Textbook- JustLee Books’ Database Assumptions: No back orders or partial shipments Only US addresses Shipped orders are purged (deleted) at the end of the month Two main databases are referenced throughout this book. The first—JustLee Books, is used to record customers’ orders. Customers and JustLee’s employees can identify a book by its ISBN, title, or author names. Employees can also determine when a particular order was placed and when, or if, the order was shipped. The database also stores publisher contact information. The second database—City Jail—is used in the case studies. Oracle 10g: SQL

Summary A DBMS is used to create and maintain a database A database is composed of a group of interrelated tables A file is a group of related records; a file is also called a table in the physical database A record is a group of related fields regarding one specific entity; a record is also called a row Oracle 10g: SQL

Summary (continued) A record is considered unnormalized if it contains repeating groups A record is in first-normal form (1NF) if no repeating groups exist and it has a primary key Second-normal form (2NF) is achieved if the record is in 1NF and has no partial dependencies After a record is in 2NF and all transitive dependencies have been removed, then it is in third-normal form (3NF), which is generally sufficient for most databases Oracle 10g: SQL

Summary (continued) A primary key is used to uniquely identify each record A common field is used to join data contained in different tables A foreign key is a common field that exists between two tables but is also a primary key in one of the tables A Structured Query Language (SQL) is a data sublanguage that navigates the data stored within a database’s tables Oracle 10g: SQL