Title: Databases
1Databases
Dimitar Hristovski, Ph.D.E-mail
dimitar.hristovski_at_mf.uni-lj.si Institute of
Biomedical InformaticsMedical FacultyUniversity
of Ljubljana, Slovenia
2Motivation
- Technological foundation for numerous biomedical
applications electronic medical record,
healthcare information systems, ... - Personal level data entry and maintenance
(during academic education and later) master
degrees, Ph.D., research projects... - Useful elsewhere as well
- Banks
- Insurances
- Government institutions
3Computer Supported Data System
- Computer supported data system system for
manipulation and processing of data, has four
components - Human user
- Program
- Data
- Computer
4Computer Supported Data System
5Data Revolution
- First period the computer is the major
component. - Second period software revolution, the programs
(software) becomes the major component. - Third period data revolution, data becomes the
central component.
6Data as the Central Component
7Database - Definitions
- Database is a model of an organization, which is
used as a basis for decision making and action
planning. - Database is a set of logically related data,
stored in a computer system, the access to which
is centralized and possible through a database
management system (DBMS). - Database is a mechanized, multi-user, formally
defined and centrally maintained collection of
data.
8Database Management
- Data is the foundation upon which the entire
functioning of an organization is based.
Therefore, just as any other important resource,
data should be carefully managed, which includes - Providing data availability
- Control of data usage
9Providing Data Availability
- Efficient access
- Of all users
- Concurrently
- To all types of data
- All the time (24 x 7 x 365)
10Control of Data Usage
- Data integrity
- Database backup and recovery
- Control of concurrent data access (transactions,
commit, rollback) - Data entry control and validation
- Using data according to their intended purpose
- Understanding the meaning of the data
- Access only to allowed data (based on type of
user)
11Database Organization
- In a more general sense, the database consists
of - Data
- Users and user programs
- Database administrator
- Database management system (specialized piece of
software)
12Types of Databases from Management Point of View
- Centralized database
- Distributed database
13Database Users
- Direct users
- Non-programmers (menu guided users, query
language users, ) - Programmers (query language users, application
programmers, system programmers, database
administrator, ) - Indirect users
14The Data Part of a Database
- Physical database the values of the data
elements - Meta-database descriptions of the physical
data - How is the data stored in permanent memory?
- What is the meaning of the data?
- How is the data accessible to the users?
15Meta-Database
- Has three level architecture
- External schema
- User view model of organization as seen by a
particular type of user (e.g. physician, nurse,
accountant, ) - Conceptual schema
- Global organization model
- Internal schema
- Collection of logical records
16Data Independence
- Changes of one schema should not have influence
on another schema. - Physical data independence
- Logical data independence
17Data Models
- A particular schema is described using a
structured description mechanism data model,
also known as data description language.
18Data Model Types
- Surface
- Relational
- Network
- Hierarchical
- Object-relational
- Deep
- Entity-relationship
- ...
19Entity-Relationship Models
- Entity any concrete or abstract object or event
in a organization or its environment, that we are
modeling (the real world) (e.g. Patient, Test,
Student, ...) - Attribute a characteristic of an entity
something we want to know about the entity (e.g.
Entity Patient Attributes Name, Last Name,
Sex, Date of birth, ...) - Values attribute values (e.g. NameJanez,
SexM, ) - Relationship meaningful relation between
entities (e.g. Exam relationship between
entities Student and Course)
20Student Administration Office Entity-Relation
Diagram
21Simplified Hospital Data Model
22Relational Table Example - Patients
23Patients Table Structure
24Table - Tests
25Table (Relationship) - Results
26Screen Form Patients and Results
27Query-by-Example (QBE)
28Equivalent SQL Statement
29SQL (Structured Query Language)
- Create create an object (table, view, index, )
- Update one or more records
- Insert one or more records
- Delete one or more records
- Select search for data the result is a table