Identifying Physical Database Requirements Identify Database Scope
Identifying Physical Database Requirements Identify Database Scope
Identifying Physical Database Requirements Identify Database Scope
these entities having same attributes are defined under ENTITY TYPE employee.
I.e. Entity set is also called Entity Extension.
Entity Instance is a single occurrence of a particular entity type. An entity type is described just one time in the
data model, but many instances of that entity type may be represented by data stored in the database.
Example: - There may be hundreds or thousands of employees in an organization each one is an instance of
the Employee entity type.
Entity type name EMPLOYEE PROJECT
Attributes name Name, Age, salary Pname, Pcode, Location
e1 P1
(Abebe, 25, 3500) (Database, p001, Bahir Dar) One entity instance
e2 P2
Entity set (Daniel, 42, 2500) (Water, P002, Gonder) One entity instance
(Entity e3 P3
Extension) (Aster, 32, 3000) (Construction, P003, Gonder)
. . One entity instance
. .
.
*
. *
en pn
*
Relationships
A relationship is an association that exist b/n two or more participating entities.
- The function of relationship is to share data between entities.
- In E-R Diagram, a relationship is represented by a diamond shape.
- As a convention, attributes are named with an initial capital letter followed by lowercase letters.
- In E-R Diagram, an attribute can be represented by an ellipse (oval) shape with a line connected it to the
associated entity. Example:
- It can also be represented by listing them within the entity rectangle, under the entity name.
Example: EMPLOYEE
Emp_Id
Fname
Lname
*
*
*
Types of attributes
An attribute can be: - simple or composite, single-value or multi-value, stored or derived or null able.
1) Simple (Atomic) vs Composite attribute
. Simple attributes cannot be further divisible; whereas Composite attributes can be divided into
smaller subparts.
› ID, Salary, Gender, etc are examples of simple attributes.
› Name, Address, etc are examples of composite attributes
. In E-R Diagram, simple attributes can be represented by an ellipse shape. Example:
. In E-R Diagram, composite attributes can be represented by branched ellipse shape:
Example:
. The value of composite attribute is the concatenation of the values of its constituent simple attributes.
2) Single-valued vs Multi-valued attributes
- Most attributes have a single value for a particular entity.
- In some cases, an attribute can have a set of value for the same entity, called multi-valued.
Example: colour attribute for a car, college degree for a person.
- In E-R Diagram, Multi-valued attributes can be represented by double ellipse (oval) shape.
3) Stored vs derived attributes
. In some cases, the value of two or more attributes can be related.
Example: the Age and Birth-Date attributes of a person
-- The Age attribute is derived from the Birth-Date attribute.
-- Age attribute is derived attribute, and the Birth-Date attribute is stored attributed
In E-R Diagram, Derived attributes can be represented by dotted ellipse.
Key attributes
- Attributes can be classified as identifiers or descriptors.
- Identifiers (more commonly called keys or key attributes) which uniquely identify each instance of an
entity, called candidate key. If such an attribute doesn't exist naturally, a new attribute is defined for that purpose,
for example an ID number or code.
- In some cases, more than one attribute is required to identify a unique entity, called composite candidate key.
- A descriptor describes a non-unique characteristic of an entity instance.
Name of trainer: Mentesnot .B Date: 08/03_/2012 E.C
gage COLLEGE
* Candidate Key is a super key whose values are not repeated in the table records.
- It is a super key that contains only the minimum number of columns necessary for unique identification.
- When the values in a super key are not repeated in the tables records, then such a key is called a candidate key.
- It is possible to have more than one choice of candidate key in a particular table. In that case, the selection of the
primary key would be driven by the designers choice or by end user requirements.
* Primary Key is a candidate key which doesnt have repeated values nor does it comes with a NULL value
in the table.
- A primary key in any table is both a super key as well as a candidate key.
- The candidate keys that are not selected to be the primary key are called alternate keys.
- Every entity in the data model must have a primary key whose values uniquely identify instances of the entity.
* Alternate key is the candidate keys that are not selected as the primary key of the entity.
* A foreign key is a column or group of columns in a relational database table that is used to establish and
enforce a link between data in two tables. You can create a foreign key by defining a FOREIGN KEY constraint
when you create or modify a table.
2.4. Developing database reports using acceptance criteria
What does Database Reports mean?
Database reports are the formatted result of database queries and contain useful data for decision-making and
analysis. Most good business applications contain a built-in reporting tool; this is simply a front-end interface that
calls or runs back-end database queries that are formatted for easy application usage.
For example, a banking software application may contain specifically defined reports on all customers with large
deposits or reports on monthly loan summaries for all customers.
What is auditing
Auditing is the monitoring and recording of selected user database actions.
Database performance can be defined as the optimization of resource use to increase throughput and minimize
contention, enabling the largest possible workload to be processed.
Database Recovery is responsible for preserving the database consistency after a failure of any kind (transaction,
system or media). Relevant information solely for recovery is saved in a log during normal transaction processing.
Recovery performance focuses primarily on crash recovery rather than on recovery after restoring a backup.
However, optimizations are possible for recovery after restoring from a backup.
An audit trail (or audit log) is a record showing who has accessed a computer system and what operations he or
she has performed during a given period of time. Audit trails are useful both for maintaining security and for
recovering lost transactions.
Most accounting systems and database management systems include an audit trail component. In addition, there
are separate audit trail software products that enable network administrators to monitor use of network
resources.
Database auditing involves observing a database so as to be aware of the actions of database users.
Database administrators and consultants often set up auditing for security purposes.
LO4. Seek Client feedback and approval
Presenting DB scope and technical requirements to user for feedback
Present database scope, technical requirements and security documentation to user for feedback is very
important to develop a successful database.
. Review user feedback and adjust database as required
. Present database and documentation to user for final approval
What is feedback?
Feedback is a Process in which the effect or output of an action is 'returned' to modify the next action.
Reviewing user feedback to adjust DB.
Presenting DB and documentation to user for final approval