Advanced Database Management System
Advanced Database Management System
Revisions of Fundamentals of
Database System
What is Database?
• Database is defined as an organized collection of
logically related data
• Database is a collection of data arranged for ease
and speed of search and retrieval
• Database is a collection of data about multiple
entities and R/ship b/n them
• Database is a backbone of any system
Database is collection of tables
Example of a Table
Fields
Order Filing
System
1) Controlling redundancy
2) Restricting unauthorized Access
3) Better service to the Users
4) Enforcing Integrity Constraint
5) Enforces standard
6) Cost of developing and maintaining systems is
lower
7) Flexibility of the system is improved
8) Provide backup and recovery
Actors on the Database Environment
1) Database Administrator
2) Database Designer
3) End users
Database Administrator
• The database administrator is responsible for authorizing
access to the database, for coordinating and monitoring its
use and for acquiring software and hardware resources as
needed.
• The DBA is accountable for problem such as breach of
security or poor system response time. In large
organizations
What is Entities
.
Domain
• Each attribute has a domain, an expression of the
allowable values for that attribute.
• A common method of specifying a domain is to
specify a data type from which the data values
forming the domain are drawn Some examples of
domains are shown below:
• Office phone: The set of 10-digit valid phone
numbers in Ethiopia
• Age: is between 0 and 125.
• Sex: Male or Female
• .
• Relationships
• A relationship relates two or more distinct entities with a
specific meaning.
• Types of relationships
A) One-to-one relationships
B) One-to-many or many-to-one relationships
C) Many-to-many relationships
Relational keys
• There are many types of keys that can be defined in
the relational model. These have significant
importance in maintaining data consistency and
correctness in the database.
1. Candidate Key
2. Primary Key
3. Foreign Key
Candidate Key
• A candidate key is one or more attribute that uniquely
identifies an entity. Every entity in relational database
must have at least one candidate key but it is possible
that some may have two or more.
• For example, sid and sname of the student may
identify the student. Therefore sid and sname can
be considered candidate keys for a student table.
Primary Key
• A primary key is an attribute, or set of attributes,
that allows each information for an entity to be
uniquely identified. Every entity in a relational
database must have a primary
Foreign Key
22
6· Foreign Key Constraint:
A foreign key is a key used to link two tables together.
A foreign key is sometimes called a referencing key.
Foreign Key is a column or a combination of columns
whose values match a Primary Key in a different table.
The relationship between 2 tables matches the Primary
Key in one of the tables with a Foreign Key in the second
table.
Learning Objectives