Professional Documents
Culture Documents
Chapter 1
Introduction to Database Management
Objectives
sophorn26sun.blogspot.com 1
14-Dec-22
• Premiere Products
– Distributor of appliances, housewares, and sporting
goods
– Uses spreadsheet software to maintain important
data
– Recent growth has made spreadsheet approach
problematic
sophorn26sun.blogspot.com 2
14-Dec-22
sophorn26sun.blogspot.com 3
14-Dec-22
Sample order
sophorn26sun.blogspot.com 4
14-Dec-22
Database Background
• Data
- Raw, unorganized facts that need to be processed.
• Database
– Structure that can store information about:
• Different categories of information
• Relationships between those categories of information
• Entity
Order
– Person, place, object, or event
– Entities for Premiere Products: sales reps,
customers, orders, and parts
Database
sophorn26sun.blogspot.com 5
14-Dec-22
• Attribute
– Characteristic or property of an entity
– Example: Customer has name, street, city, etc.
– May also be called a field or column
• Relationship
– Association between entities
– One-to-many relationship
• Each rep is associated with many customers
• Each customer is associated with a single rep
Keys
• Primary Key: A column (or columns) in a table that
uniquely identifies the rows in that table.
• Candidate Key: is a column that meets all of the
requirements of a primary key.
• Foreign Key: A column (or columns) in a table that
refer to another table.
Customers
CID Name IDCardNo Address Orders
110 Jonh 123456 NY ID Date CID
220 David 456123 LA 01 7/8/20 220
330 Jonh 789456 NY 02 7/8/20 110
sophorn26sun.blogspot.com 6
14-Dec-22
Types of Relationship
Customers
CID Name IDCardNo Address Orders
110 Jonh 123 NY ID Date CID
220 David 456 LA 01 7/8/20 220
330 Jonh 789 NY 02 7/8/20 110
03 8/8/20 110
sophorn26sun.blogspot.com 7
14-Dec-22
sophorn26sun.blogspot.com 8
14-Dec-22
One-to-many relationship
• Data file
– File used to store data
– Computer counterpart to ordinary paper file
• Database
– Structure that can store information about:
• Multiple types of entities
• Attributes of those entities
• Relationships between the entities
sophorn26sun.blogspot.com 9
14-Dec-22
sophorn26sun.blogspot.com 10
14-Dec-22
sophorn26sun.blogspot.com 11
14-Dec-22
Slide 34
24
sophorn26sun.blogspot.com 12
14-Dec-22
sophorn26sun.blogspot.com 13
14-Dec-22
Part form
sophorn26sun.blogspot.com 14
14-Dec-22
Orders form
Parts report
sophorn26sun.blogspot.com 15
14-Dec-22
Database Processing
• Non-database Approach
- Example of a university database
sophorn26sun.blogspot.com 16
14-Dec-22
Database Processing
(continued)
• Database Approach
sophorn26sun.blogspot.com 17
14-Dec-22
Disadvantages of Database
Processing
1. Larger file size
2. Increased complexity
3. Greater impact of failure
4. More difficult recovery
sophorn26sun.blogspot.com 18
14-Dec-22
sophorn26sun.blogspot.com 19
14-Dec-22
sophorn26sun.blogspot.com 20
14-Dec-22
sophorn26sun.blogspot.com 21
14-Dec-22
sophorn26sun.blogspot.com 22
14-Dec-22
Summary
Summary (continued)
• One-to-many relationship: each occurrence of first
entity is related to many occurrences of the second
entity and each occurrence of the second entity is
related to only one occurrence of the first entity
• Database: structure that can store information
about multiple types of entities, attributes of
entities, and relationships among entities
• Premiere Products requires information about reps,
customers, parts, orders, and order lines
• Entity-relationship (E-R) diagram: represents a
database visually by using various symbols
Introduction to Database Management 46
sophorn26sun.blogspot.com 23
14-Dec-22
Summary (continued)
• Database management system (DBMS): program
through which users interact with a database; lets
you create forms and reports quickly and easily
and obtain answers to questions about the data
• Advantages of database processing: getting more
information from the same amount of data, sharing
data, balancing conflicting requirements, controlling
redundancy, facilitating consistency, improving
integrity, expanding security, increasing
productivity, and providing data independence
Summary (continued)
• Disadvantages of database processing: larger file
size, increased complexity, greater impact of
failure, and more difficult recovery
• Henry Books needs to store information about:
branches, publishers, authors, books, inventory,
and author sequence
sophorn26sun.blogspot.com 24