Download presentation
Presentation is loading. Please wait.
Published byRudolf Mason Modified over 9 years ago
1
C20.0001 Computer-Based Systems for Management Support Kevin Brabazon D atabases : Fundamentals
2
Learning objectives for Session 11 Relational database fundamentals 1.Get a basic idea about the difference between OLTP and OLAP 2.Understand what a database is, and how it is different from a DBMS and and a DBA 3.Understand what relational databases are 4.Identify and distinguish between the following parts of a relational database: tables, records, fields, field values 5.Understand three types of anomalies that arise from un- normalized data 6.Understand what primary keys and foreign keys are 7.Understand entities and primary keys
3
OLTP and OLAP OLTP: Online transaction processing –Gathering input information –Processing that information –Updating existing information to reflect the gathering and processing that has taken place OLAP: Online analytical processing –Manipulating data to support decision making Associated with a specific transaction: A repeated, routine event in the day-to-day working of an organization. Example of a transaction: Placing an order at Amazon.com Performed by transaction processing systems (TPS)
4
What are databases? –Collections of information that are organized according to the logical structure of that informationDatabases Database management systems (DBMS) –a software application with which you can create, store, organize and retrieve data from one or many databases –Oracle 8, Access, Sybase, Informix, DB2 Database administrator (DBA) –Person responsible for the development and management of an organization’s databases
5
Relational Databases Last NameSS#DOBMajor Smith10020112206/11/84IS Kim2002022221/1/85FIN Davis30020123212/31/81MKT Pat9991322123/3/88ACC Student Relational databases –Databases that use a series of logically related two-dimensional tables to store their information –Tables are comprised of fields/records, which in turn contain field values Table Field Record Field value
6
Relational Database Tables RecordsFields Field values Bytes, bits Last NameSS#DOBMajor Smith10020112206/11/84IS Kim2002022221/1/85FIN Davis30020123212/31/81MKT Pat9991322123/3/88ACC Student Table Field Record Field value Relational Databases
7
Why do we need relational databases? Problems arise when data is stored in one big file
8
Anomalies in un-normalized data Insertion anomalies –Inability to insert a piece of information about an object that can exist independently of another object without having to insert a piece of information about the other object Deletion anomalies –The loss of a piece of information about one object when a piece of information about a different object is deleted Update anomalies –A need to change the same piece of information about an object multiple times –Example: Adding a new customer/book before it is ordered –Example: Deleting an order => deleting a customer/book –Example: Changing Bill Gates’ address
9
What’s wrong with this Data?
10
A normalized version of Amazon’s data Normalization –The process of assuring that a database can be implemented effectively as a set of two-dimensional tables –Prevents insertion, deletion and update anomalies
11
Connecting tables together Primary keys –A field (or group of fields in some cases) that uniquely describes each record in a table –Examples: Customer ID, ISBN, Order# Foreign keys –A field that is a primary key in one table and appears in a different table (though not as the primary key) –Examples: Customer ID in Orders Integrity constraints Rules that help ensure quality of information
12
Defining Entity Classes and Primary Keys Entity class - a concept - typically people, places, or things - about which you wish to store information and that you can identify with a unique key (called the primary key). Primary key - a field (or group of fields in some cases) that uniquely describes each record. Instance - an occurrence of an entity class that can be uniquely described.
13
Defining Entity Classes and Primary Keys What are the entity classes and primary keys for the report below?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.