Professional Documents
Culture Documents
Banks
Travel Agents
Major Database Concepts Data and information Data - Raw facts Information - Processed data
Data management
Database Metadata (=Data about data) Database management system (DBMS)
3
DBMS is the software that interacts with the users, application programs, and the database. Example : IBM DB2, Microsoft SQL Server, Oracle, MySQL etc.
Data
DBMS
Application Programs
Importance of DBMS It helps make data management more efficient and effective. It provides end users better access to more and better-managed data. It promotes an integrated view of organizations operations -- big picture. It reduces the probability of inconsistent data.
5
The DBMS Manages the Interaction Between the End User and the Database
A poorly designed database is a breeding ground for uncontrolled data redundancies. A poorly designed database generates errors that lead to bad decisions.
7
Field
Record
File
Student File Id No. 1100 1200 1300 1400 Record all data about 1500
one occurrence of the entity (collection of related fields)
Field an
Faculty FIT FIT FCM FCM FOE Major SE MIS MM MM CE
individual characteristic or attribute
10
11
A change in any files structure requires the modification of all programs using that file.
Data Dependence
A change in any files data characteristics requires changes in all data access programs.
Significance of data dependence is the difference between the data logical format and the data physical format.
13
Field Definitions and Naming Conventions A good (flexible) record definition anticipates reporting requirements by breaking up fields into their components. Example: Customer Name --> Last Name, First Name, Initial Customer Address --> Street Address, City, State
14
Field Definitions and Naming Conventions Selecting proper field names is very important.
Names must be as descriptive as possible within restrictions. Naming must reflect designers documentation needs and users reporting and processing requirements.
15
CONTENTS Customer last name Customer first name Customer initial Customer area code Customer phone Customer street address or box number Customer city Customer state
16
Data Redundancy: Uncontrolled data redundancy sets the stage for Data Inconsistency (lack of data integrity) Data anomalies
Modification anomalies
Insertion anomalies Deletion anomalies
17
Database Systems
Software Operating systems software DBMS software Applications programs and utilities software
18
Database Systems
The Database System Components People Systems administrators (SA) Database administrators (DBAs) / Owner (Dbo) Database designers Systems analysts and programmers End users Procedures (sp) Instructions and rules that govern the design and use of the database system Data Collection of facts stored in the database
19
Database Systems
The Database System Components The complexity of database systems depends on various organizational factors:
Organizations size Organizations function Organizations corporate culture Organizational activities and environment
Database Systems
Types of Database Systems Number of Users Single-user Desktop database Multiuser Workgroup database Enterprise database Scope/limitation Desktop Workgroup Enterprise
21
Database Systems
The types of Database Systems Location Centralized Database Distributed Database
22
Database Systems
DBMS Functions 1. Data Dictionary Management 2. Data Storage Management 3. Data Transformation and Presentation 4. Security Management 5. Multi-User Access Control 6. Backup and Recovery Management 7. Data Integrity Management 8. Database Access Languages (DDL and DML) and Application Programming Interfaces 9. Database Communication Interfaces
23
Database Models
A database model is a collection of logical constructs used to represent the data structure and the data relationships found within the database. Two Categories of Database Models Conceptual models focus on the logical nature of the data representation. They are concerned with what is represented rather than how it is represented. Implementation models place the emphasis on how the data are represented in the database or on how the data structures are 24 implemented.
Database Models
Three Types of Relationships One-to-many relationships (1:M) A painter paints many different paintings, but each one of them is painted by only that painter. PAINTER (1) paints PAINTING (M) Many-to-many relationships (M:N) An employee might learn many job skills, and each job skill might be learned by many employees. EMPLOYEE (M) learns SKILL (N) One-to-one relationships (1:1) Each store is managed by a single employee and each store manager (employee) only manages a single store. EMPLOYEE (1) manages STORE (1)
25
Database Models
Three Types of Implementation Database Models Hierarchical database model Network database model
26
Hierarchical Database Model Basic Structure Collection of records logically organized to conform to the upside-down tree (hierarchical) structure. The top layer is perceived as the parent of the segment directly beneath it. The segments below other segments are the children of the segment above them. A tree structure is represented as a hierarchical path on the computers storage 27 media.
1st Student
P203 P200 P201
Location Stud#
P200 P201 P202 P203 P204 P205 P206 P207 1234 4678 2943 1874 4017 2318 6021 5503
Pointers give the physical location of a related set of data, the location values (P10, P201, etc.) in our example are meant to represent this type of physical location. Real pointers usually indicate a displacement in a file. Instead of the P203 value in the first professor record we would see an indicator that the related data begins at the 4028th byte of the file that stores student data
29
Location
P200 P201 P202 P203 P204 P205 P206 P207
Class Standin Stud# S_name g 1234 Smith Fr 4678 Davis So 2943 Evans Fr 1874 Allen Jr 4017 Lloyd Fr 2318 Marx Sr 6021 Keen So 5503 Watts Jr
30
Hierarchical
A hierarchical relationship is one where each entity at a lower level of the hierarchy is related to only one type of entity at a higher level of the hierarchy (a higher level entity can be linked to two or more lower level child entities)
32
model
Databases using the Network model use physical pointers to link records - like the hierarchical model do support network as well as hierarchical relationships + Network databases provide very efficient highspeed retrieval + Can represent network, as well as, hierarchical relationships easily Are difficult to modify as an organizations data needs change Have complex pointer structures which can be difficult to manipulate and hard for end-users34 to understand.
Network Relationships
A network relationship is one in which an entity at a lower level can be linked to two or more entities at a higher level. E.G. - an order is related to both a customer who placed it and a salesperson who made the sale The hierarchical model does not
C
A
To capture them a second database would have to be created and linked to the first.
35
Class Standing
Fr So Fr Jr Fr Sr So Jr
37
38
39
A Relational Schema
40
The ER Diagram
Complements the relational data model concepts Represented in an entity relationship diagram (ERD) Based on entities, attributes, and relationships
43
An object is described by its factual content. An object includes information about relationships between the facts within the object, as well as with other objects. An object is a self-contained building block for autonomous structures.
46
48
49
Terminal
Only I/O done here
Terminal
Only I/O done here
Client-Server Database
All data reside on a central server Core database management processing is performed on server Application files and processing to request data, manipulate results and manage the user interface is performed on client computers
51
Client Comp
Syntax checks of SQL stmts. Manipulation - presentation of retrieved data done here
Server Computer
Client Comp
Syntax checks of SQL stmts. Manipulation - presentation of retrieved data done here
References
ROB, P. AND CORONEL, C., 2004, Database Systems. 6th Ed., Thomson Course Technology
53