3. Database: Historical Roots
Manual File System
ā¦ to keep track of data
ā¦ used tagged file folders in a filing cabinet
ā¦ organized according to expected use
ā¦ e.g. file per customer
ā¦ easy to create, but hard to
ā¦ locate data
ā¦ aggregate/summarize data
Computerized File System
ā¦ to accommodate the data growth and information need
ā¦ manual file system structures were duplicated in the computer
ā¦ Data Processing (DP) specialists wrote customized programs to
ā¦ write, delete, update data (i.e. management)
ā¦ extract and present data in various formats (i.e. report)
3
5. File System: Weakness
Weakness
ā¦ āIslands of dataā in scattered file systems.
Problems
ā¦ Duplication
ā¦ same data may be stored in multiple files
ā¦ Inconsistency
ā¦ same data may be stored by different names in different format
ā¦ Rigidity
ā¦ requires customized programming to implement any changes
ā¦ cannot do ad-hoc queries
Implications
ā¦ Waste of space
ā¦ Data inaccuracies
ā¦ High overhead of data manipulation and maintenance
5
6. File System: Problem Case
6
CUSTOMER file AGENT file SALES file
A_Name (15 char)
Carol Johnson
A_Name (20 char)
Carol T. Johnson
AGENT (20 char)
Carol J. Smith
- inconsistent field name, field size
- inconsistent data values
- data duplication
7. Database System vs. File
System
7
Database Systems: Comparison between file system and DBMS
8. Relational Database
Problems with legacy database systems
ā¦ Required excessive effort to maintain
ā¦ Data manipulation (programs) too dependent on physical file structure
ā¦ Hard to manipulate by end-users
ā¦ No capacity for ad-hoc query (must rely on DB programmers).
Evolution in Data Organization
ā¦ E. F. Coddās Relational Model proposal
ā¦ Separated the notion of physical representation (machine-view)
from logical representation (human-view)
ā¦ Considered ingenious but computationally impractical in 1970
ā¦ Relational Database Model
ā¦ Dominant database model of today
ā¦ Eliminated pointers and used tables to represent data
ā¦ Tables
ā¦ flexible logical structure for data representation
ā¦ a series of row/column intersections
ā¦ related by sharing common entity characteristic(s)
8
9. Relational Database: Example
9
ļ® Provides a logical āhuman-levelā view of the data and associations
among groups of data (i.e., tables)
Customer_ID Customer_Account Agent_ID
1224 4556 23
1225 4558 25
Agent_ID Last_Name First_Name Phone
23 Sturm David 334-5678
25 Long Kyle 556-3421
Customer_ID Last_Name First_Name Phone Account_Balance
1224 Vira Dyne 678-9987 1223.95
1225 Davies Tricia 556-3342 234.25
10. Relational Database: Pros & Cons
Advantages
ā¦ Structural independence
ā¦ Separation of database design and physical data storage/access
ā¦ Easier database design, implementation, management, and use
ā¦ Ad hoc query capability with Structured Query Language (SQL)
ā¦ SQL translates user queries to codes
Disadvantages
ā¦ Substantial hardware and system software overhead
ā¦ more complex system
ā¦ Poor design and implementation is made easy
ā¦ ease-of-use allows careless use of RDBMS
10
11. Entity Relationship Model
Peter Chenās Landmark Paper in 1976
ā¦ āThe Relationship Model: Toward a Unified View of Dataā
ā¦ Graphical representation of entities and their relationships
Entity Relationship (ER) Model
ā¦ Based on Entity, Attributes & Relationships
ā¦ Entity is a thing about which data are to be collected and stored
ā¦ e.g. EMPLOYEE
ā¦ Attributes are characteristics of the entity
ā¦ e.g. SSN, last name, first name
ā¦ Relationships describe an associations between entities
ā¦ i.e. 1:M, M:N, 1:1
ā¦ Complements the relational data model concepts
ā¦ Helps to visualize structure and content of data groups
ā¦ entity is mapped to a relational table
ā¦ Tool for conceptual data modeling (higher level representation)
ā¦ Represented in an Entity Relationship Diagram (ERD)
ā¦ Formalizes a way to describe relationships between groups of data
11
12. E-R Diagram: Relationships
Entity
ā¦ represented by a rectangle with its name in capital
letters.
Relationships
ā¦ represented by an active or passive verb inside
the diamond that connects the related entities.
Connectivities
ā¦ i.e., types of relationship
ā¦ written next to each entity box.
12
Database Systems: Design, Implementation, & Management: Relationships
13. E-R Model: Pros & Cons
Advantages
ā¦ Exceptional conceptual simplicity
ā¦ easily viewed and understood representation of database
ā¦ facilitates database design and management
ā¦ Integration with the relational database model
ā¦ enables better database design via conceptual modeling
Disadvantages
ā¦ Incomplete model on its own
ā¦ Limited representational power
ā¦ cannot model data constraints not tied to entity relationships
ā¦ e.g. attribute constraints
ā¦ cannot represent relationships between attributes within entities
ā¦ No data manipulation language (e.g. SQL)
ā¦ Loss of information content
ā¦ Hard to include attributes in ERD
13
14. Web Database : Future of DBMS
Internet is emerging as a prime business tool
ā¦ Shift away from models (e.g. relational vs. O-O)
ā¦ Emphasis on interfacing with the Internet
Characteristics of āInternet ageā databases
ā¦ Flexible, efficient, and secure Internet access
ā¦ Support for complex data types & relationships
ā¦ Seamless interfaces with multiple data sources and structures
ā¦ Ease of use for end-user, database architect, and database administrator
ā¦ Simplicity of conceptual database model
ā¦ Many database design, implementation, and application development tools
ā¦ Powerful DBMS GUI
14