Database Fundamentals
Open Source 34
Agenda
What is Database?
Types of databases
DBMS (Database Management System)
E.R.D (Entity Relationship Diagram)
2
What is database
3
What is database?
Database :
Organized collection of logically related data
Data :
Known facts
Types: text, graphics, images, sound, videos
4
What is database? Cont'd
Examples of Database :
5
What is database? Cont'd
Examples of Database :
6
Types of database
7
Types of database
Flat-file
Hierarchical
Network
Relational
Object-relational
8
Types of database cont'd
• Type • Typical number • Typical • Typical size
of users architecture
• Personal • 1 • Desktop/Laptop/ • MB
• PDA
• Workgroup • 5-25 • Client/server:2 • MB-GB
tier
• Department • 25-100 • Client/server:3 • GB
tier
• Enterprise • >100 • Client/server: • GB-TB
• distributed
• Internet • >1000 • Web sever & • MB-GB
application
servers
9
Types of database
Flat-file system :
It is a collection of programs that perform services for the
end user. Each Program defines and manages its own
data
10
Types of database cont'd
Characteristics:
- Data is stored as records in regular files
- Records usually have a simple structure and
fixed number of fields
- For fast access may support indexing of fields in
the records
- No mechanisms for relating data between files
- One needs special programs in order to access
and manipulate the data
11
Types of database cont'd
Limitations of Flat-file system :
Separation & Isolation Of data
Duplication Of data
Program Data Dependence
Incompatible File Formats
12
Types of database cont'd
Relational database :
- Data is organized into tables: rows & columns
- Each row represents an instance of an entity
- Each column represents an attribute of an entity
- Metadata describes each table column
- Relationships between entities are represented by
values stored in the columns of the corresponding tables
(keys)
- Accessible through Structured Query Language (SQL)
13
Types of database cont'd
Advantages of relational database :
- Controlling Redundancy.
- Sharing data.
- Inconsistency can be avoided
14
DBMS
15
DBMS
Database Management System (DBMS):
A software package/ system to facilitate the creation and
maintenance of a computerized database.
Database System:
The DBMS software together with the data itself.
Sometimes, the applications are also included.
( Software + Database )
16
DBMS cont'd
• Users
• Database System
• Application Programs
• DBMS • Software to process
Software • Queries
• Software to access Stored Data
• Stored DB
• Stored
• Definition
• Database
• (Metadata)
17
DBMS cont'd
Name Type Max Length Description
Name Alphanumeric 100 Organism name
Size Integer 10 Genome length (bases)
Gc Float 5 Percent GC
Accession Alphanumeric 10 Accession number
Release Date 8 Release date
Center Alphanumeric 100 Genome center name
Sequence Alphanumeric Variable Sequence
Name Size Gc Accession Release Center Sequence
Escherichia coli K12 4,640,000 50 NC_000913 09/05/1997 Univ. AGCTTTTC
Wisconsin ATT…
Streptococcus 2,040,000 40 NC_003098 09/07/2001 Eli Lilly and TTGAAAGA
pneumoniae R6 Company AAA…
…
18
DBMS
Advantages :
Controlling Redundancy.
Restricting Unauthorized Access.
Sharing data.
Enforcing Integrity Constraints
Inconsistency can be avoided.
Providing Backup and Recovery.
19
DBMS
Disadvantages :
It needs expertise to use (which is expensive)
DBMS itself is expensive
The DBMS may be incompatible with any other available
DBMS
20
ERD
21
ERD
Entity Relationship Diagram (ERD):
identifies information required by the business by
displaying the relevant entities and the
relationships between them.
22
ERD cont'd
In building a data model a number of questions must
be addressed:
What entities need to be described in the model?
What characteristics or attributes of those entities need to
be recorded?
Can an attribute or a set of attributes be identified that will
uniquely identify one specific occurrence of an entity?
What associations or relationships exist between
entities?
24
ERD cont'd
Entity - An entity is a thing that exists and is distinguishable --
an object, something in the environment. ( Types of entities:
Weak- Regular)
Entity Instance - An instance is a particular occurrence of an
entity. For example, each person is an instance of an entity, each
car is an instance of an entity, etc.
25
ERD cont'd
Types of Attributes :
Key
Multi-valued
Composite
Derived
26
ERD cont'd
Types of Attributes :
Key
Multi-valued
Composite
Derived
27
ERD cont'd
Relationships :
Cardinality : (one 2 one – many 2 one – many 2 many)
Degree : (Unary – Binary – Teri-nary)
Participation : (Full - Partial)
28
LET's
Have FUN
29
Thank
You
30