Upload
isatriany
View
412
Download
3
Embed Size (px)
Citation preview
1
• Introduction to Database Management System
• Database Background
• Advantages and Disadvantages of DBMS
• Database Case:– Premier Product– Hendry Book– Alexamara Marina Group
2
• Introduce Premiere Products, the company that is used as the basis for many of the examples throughout the text
• Introduce basic database terminology• Describe database management systems (DBMSs)• Explain the advantages and disadvantages of
database processing• Introduce Henry Books, the company that is used in a
case that appears throughout the text• Introduce Alexmara Marina Group, the company that
is used in another case that appears throughout the text
3
• Premiere Products– Distributor of appliances, houseware, and
sporting goods– Uses spreadsheet software to maintain
important data– Recent growth has made spreadsheet
approach problematic
4
FIGURE 1-1: Sample orders spreadsheet5
• Problems using spreadsheet
– Redundancy
• Duplication of data or the storing of the same data in more than one place
– Difficulty accessing related data
– Limited security
– Size limitations
6
FIGURE 1-3: Entities and attributes
7
FIGURE 1-4: One-to-many relationship
8
• 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
9
FIGURE 1-5: Sample data for Premiere Products
10
FIGURE 1-5: Sample data for Premiere Products
11
FIGURE 1-5: Sample data for Premiere Products
12
FIGURE 1-6: Alternative Orders table structure
13
• Entity-relationship (E-R) diagram– Visual way to represent a database– Rectangles represent entities– Lines represent relationships between
connected entities
14
FIGURE 1-7: E-R diagram for the Premiere Products database
15
• Database management system (DBMS)– Program, or collection of programs, through
which users interact with a database
• Popular DBMSs: Access, Oracle, DB2, MySQL, and SQL Server
• Premiere Products decides to use Access• Database design
– Determining the structure of the required database
16
17
FIGURE 1-8: Using a DBMS directly
18
FIGURE 1-9: Using a DBMS through another program
• Forms– Screen objects used to maintain, view, and
print data from a database– DBMS creates forms that Premiere Products
needs
• Reports– DBMS creates reports for Premiere Products
based on user’s answers about the desired content and appearance of each report
19
FIGURE 1-10: Part form
20
FIGURE 1-11: Orders form
21
FIGURE 1-12: Parts report
22
1. Getting more information from the same amount of data
2. Sharing data3. Balancing conflicting requirements
– Database administrator or database administration (DBA): person or group in charge of the database
4. Controlling redundancy5. Facilitating consistency
23
6. Improving integrity• Integrity constraint: a rule that data must
follow in the database
7. Expanding security• Security: prevention of unauthorized access
8. Increasing productivity9. Providing data independence
– Data independence: can change structure of a database without changing the programs that access the database
24
1. Larger file size
2. Increased complexity
3. Greater impact of failure
4. More difficult recovery
25
• Henry Books– Book store chain operated by Ray Henry
• Henry decided to use database to gather and store information on:– Branches– Publishers– Authors– Books
26
FIGURE 1-15: Sample branch and publisher data for Henry Books
27
FIGURE 1-15: Sample branch and publisher data for Henry Books28
FIGURE 1-16: Sample author data for Henry Books29
FIGURE 1-17: Sample book data for Henry Books30
FIGURE 1-18: Sample data that relates books to authors and books to branches for Henry Books
31
FIGURE 1-18: Sample data that relates books to authors and books to branches for Henry Books (continued)
32
FIGURE 1-19: E-R diagram for the Henry Books database
33
• Alexamara Marina Group offers in-water boat storage to owners– Provides boat slips that boat owners can rent
on an annual basis– Two marinas: Alexamara East and Alexamara
Central– Provides boat repair and maintenance
services
• Database used to store data
34
FIGURE 1-20: Sample marina data for Alexamara Marina Group
35
FIGURE 1-21: Sample owner data for Alexamara Marina Group
36
FIGURE 1-22: Sample data about marina slips for Alexamara Marina Group
37
FIGURE 1-23: Sample data about service categories for Alexamara Marina Group
38
FIGURE 1-24: Sample data about service requests for Alexamara Marina Group39
FIGURE 1-24: Sample data about service requests for Alexamara Marina Group (continued)
40
FIGURE 1-25: E-R diagram for the Alexamara Marina Group database
41
1. What is Problems with non-database approaches to data management?
2. Give an examples for Entity, Attribute and Relationship
3. What is ER Diagram?4. What is Relationship means in DBMS?5. Write down advantages and disadvantages of
DBMS.6. Why a data is better storage to DBMS not in
spreadsheet?
42
43
CUSTOMER
Cust. Code
Cust. Name Cust. AddressCust.
PhoneCust.
NationalityC0101 Philip Gobarvhe St. Address No. 1 555-7878 RussianC0102 Hiroshi Kimura St. Address No. 2 555-7879 JapaneseC0103 Robert Walter St. Address No. 3 555-7880 EnglishC0104 Ming San Lung St. Address No. 4 555-7881 ChineseC0105 Alliz Silverbert St. Address No. 5 555-7882 AustralianC0106 Dorris Muchter St. Address No. 6 555-7883 GermanyC0107 Steve Chen St. Address No. 7 555-7884 SingaporeanC0108 Zheng Hui Wen St. Address No. 8 555-7885 Chinese
RoomID Room Name Room RateR0001 Single 80R0002 Double 120R0003 Dexule 180R0004 VIP Suite 230R0005 President Suite 480
ROOM
RSID Service Name Service Price
RS001 Beverage 12
RS002 Breakfast Buffet 25
RS003 Lunch Buffet 28
RS004 Dinner Buffet 32
SERVICE
44
STAYRECAP
Date ChkIn Date ChkOutStay
Day(s)Cust. Code Cust. Name
Cust. Nationality
Total Price
01 Januari 2007
05 Januari 2007 4 day(s)C0103 Robert Walter English 170
01 Januari 2007
03 Januari 2007 2 day(s)C0101 Philips Gobarvhe Russian 130
01 Januari 2007
04 Januari 2007 3 day(s)C0102 Hiroshi Kimura Japanese 502
02 Januari 2007
04 Januari 2007 2 day(s)C0105 Alliz Silverbert Australian 254
02 Januari 2007
06 Januari 2007 4 day(s)C0106 Dorris Muchter Germany 480
03 Januari 2007
08 Januari 2007 5 day(s)C0104 Ming San Lung Chinese 461
03 Januari 2007
05 Januari 2007 2 day(s)C0108 Zheng Hui Wen Chinese 531
03 Januari 2007
09 Januari 2007 6 day(s)C0107 Steve Chen Singaporean 380
45
Cust. Code Transaction ID Transaction Name Qty Price Sub Total
C0101 R0001 Single 1 80,00 80,00
C0101 RS002 Breakfast Buffet 2 25,00 50,00 C0102 R0004 VIP Suite 1 230,00 230,00 C0102 RS002 Breakfast Buffet 4 25,00 100,00
C0102 RS001 Beverage 2 12,00 24,00
C0102 RS003 Lunch Buffet 3 28,00 84,00
C0102 RS004 Dinner Buffet 2 32,00 64,00 C0103 R0002 Double 1 120,00 120,00
C0103 RS002 Breakfast Buffet 2 25,00 50,00
TRANSACTION
46
47
48