LECT 5 COS 101-Databse Systems - New
LECT 5 COS 101-Databse Systems - New
COMPUTING SCIENCE
LECT 5 COS 101
DATABASE SYSTEM
LEARNING OUTCOME
•By definition:
Database is an organized collection of operational
data used by the application systems of a particular
enterprise to derive information from data.
IMPORTANT TERMINOLOGIES
Operational data: data maintained about the operation of an Enterprise: generic term for any reasonably large-scale
enterprise.
• E.g Baze university commercial, scientific, technical, or other application
• Department
• manufacturing
• Students
• Course • financial
• Tutor
• medical
• Employee etc
• E.g Shoprite Enterprise • university
• Sales
• government
• Product
• Manufacturer
• Category
• Suppliers
WHAT IS A DATABASE SYSTEM (DBMS)?
Examples:
DATABASE LANGUAGE
i. System analyst
ii. Database Designers
iii. Database Administrators
iv. Application Developers
v. Users of enterprise applications
TRADITIONAL DATA SYSTEM VS DBMS
EXAMPLE:
• Get the customers with the most
purchase.
• Get most purchased items
• Give premiums and advertise similar
products to them
APPLICATIONS OF DBMS
• Banking: For customer information, accounts, loans, and banking transactions.
• Airlines: For reservations and schedule information. Airlines were among the first to use databases
in a geographically distributed manner.
• Universities: For student information, course registrations, section, instructor and grades.
• Credit Card transactions: For purchases on credit cards and generation of monthly statements.
• Telecommunication: For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks.
• Finance: For storing information about holdings, sales, and purchases of financial instruments such
as stocks and bonds;
APPLICATIONS CONT..
• Finance: for storing real-time market data to enable on-line trading by customers and
automated trading by the firm.
• Sales: For customer, product, and purchase information.
• On-line retailers: For sales data noted above plus on-line order tracking/ generation of
recommendation lists, and maintenance of on-line product evaluations.
• Manufacturing: For management of the supply chain and for tracking production of
items in factories, inventories of items in warehouses and stores, and orders for items.
• Human resources: For information about employees, salaries, payroll taxes, benefits,
and for generation of pay checks
DBMS ARCHITECTURE
LEVELED ARCHITECTURE OF A DBMS
Conceptual
External /
Model (ERM)
View 1 Logical
Mapping Logical / Physical
Mapping
View 2 Logical Physical
Database Database
Physical Level
View n (as stored)
Logical Level
External Level
(View Level)
Logical Data Physical Data
Independence Independence
PICTORIAL VIEW OF DBMS ARCHITECTURE
(Interaction between the end user and the database)
LEVELS OF ABSTRACTION
Users
• Views (also called External level): describe how
users see the data.
• Conceptual schema (Logical level): defines
View 1 View 2 View 3
logical structure, (data tables and relationships).
• Physical schema (physical level) describes the Conceptual Schema
actual files and indexes stored (raw data). Physical Schema
DB
DBMS EXAMPLE: UNIVERSITY DATABASE
Database models
Cust IDx Name Address Email Phone Product Product descriptio Order id Order Order
number ID name n date quantity
ct211 Joe biden 22 wuse jb@gmail. 08033212 00d1 disinfectta Detol 0001 12/07/200 5
com 220 nt disinfectan 3 repeated
t
ct212 Faith 3 gateway feve@yah 08123232 00t4 Tambourin Ppr 0005 5/07/2009 1
evans oo.com 345 e company
ct211 Joe biden 22 wuse jb@gmail. 08033212 00rr2 Music box Gg 0004 12/07/200 10
com 220 company 3
SOLUTION
Separate concepts into individual relational tables, whereby a table Order can manage relationship between Customer and
Product.
Customer table
Product table
Cust ID Name Address Email Phone
number Prod ID Name Description Category Supplier
ct211 Joe biden 22 wuse jb@gmail. 08033212
00d1 disinfectant Detol 1 Mark ben
com 220
disinfectant
ct212 Faith 3 gateway feve@yah 08123232
00t4 Tambourine Ppr flat ab Philips global
evans oo.com 345
00rr2 Music box Gg small, blue
Order table
Order ID Cust ID Prod ID Quantity Date Amount
• Data Mining: The area of computer science that deals with discovering patterns in
collections of data.
• Class description
• Class discrimination
• Cluster analysis
• Association analysis
• Outlier analysis
• Sequential pattern analysis