Introduction To Databases
Introduction To Databases
Management
Systems
Microsoft Office
Ms Access
Open office
Base
DB
Oracle
SQL Server
Sybase
FoxPro
Clipper
Paradox
EXAMPLES
FUNCTIONS OF A DBMS
Data Security
Data Integrity
Backup and recovery
Concurrent Data Access
User-Oriented Data Manipulation
Application Development
ADVANTAGES OF DATABASES
Reduced data redundancy
Reduced updating errors and increased
consistency
Greater data integrity and independence from
applications programs
Improved data access to users through use of host
and query languages
Improved data security
Reduced data entry, storage, and retrieval costs
Facilitates development of new applications
program
DISADVANTAGES OF DATABASES
Database systems are complex, difficult,
and time-consuming to design
Substantial hardware and software start-up
costs
Damage to database affects virtually all
applications programs
Extensive conversion costs in moving from a
file-based system to a database system
Initial training required for all programmers
and users
SQL
STRUCTURED QUERY LANGUAGE
TYPES OF KEYS
Super key
Any unique field(s) of a table
Candidate key
Every minimal super key of a table
Primary key
One of the candidate keys that we choose as the unique
identifier of a table
Alternate key
Candidate keys other than the primary key
Composite key
When the primary key contain more than one field it is called a
composite key
KEYS
Primary key
a field in which very uniquely identifies its
records.
Ex : -
Employee Student
ATTRIBUTE – A property or characteristic of an entity
Notation : - Attribute
Ex : -
Emp_id Emp_name
Employee
TYPES OF ATTRIBUTES
SIMPLE (ATOMIC) ATTRIBUTES
An attribute that cannot be broken down into parts
COMPOSITE ATTRIBUTES
An attribute that can be subdivided into parts.
Emp_name
SINGLE VALUED ATTRIBUTES
An attribute that take only one value for a given entity.
Phone_no Skills
Employee
STORED ATTRIBUTES
An attribute whose values are recorded in the database
DERIVED ATTRIBUTES
An attribute whose values can be calculated from related attributes.
Birthday age
Employee
RELATIONSHIPS
If an attribute of one entity type refers to another entity type,
then there are some relationship between them.
Notation : -
Relationship
Unary relationship
Binary relationship
Ternary relationship
N - ary relationship
UNARY RELATIONSHIP (DEGREE 1)
Relationship among instances of one entity type.
Employee
Manages
BINARY RELATIONSHIP (DEGREE 2)
Relationship among instances of two entity types.
Course
Lecturer teaches Module
CARDINALITY RATIOS
(MULTIPLICITY)
Cardinality ratio specifies the number of
relationship instances that an entity can
participate in.
Student Follow
M N Courses
Customer buy
M N Product