Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Data: Collection of facts & figures. Derives from Latin “to give”
Data is unprocessed facts and figures without any added interpretation
or analysis.
Any Fact-That can be recorded
E.g: Text ,Number,Images,Video etc
Information: Result of processing raw data to reveal its meaning.
Information is data that has been interpreted so that it has meaning for
the user.
Database: Organized collection of data, storing the idea & retrieving
the information
Storing the idea :
Text and numbers : Traditional Database
Audio Video: Multimedia Database
Production ,Stores, Place order :Real time database
a large store of data accumulated from a wide range of sources
within a company and used to guide management decisions.
:data warehouse
Data
Hardware
Software
Users
Users/Programmers
Application Programs/Queries
Software to Process
Queries/Programs
Software to Access
Stored Data
The database has five files, each which stores data records of the same
type.
Advantages of DBMS :
Shared Data :
Reduction of Redundancies : Centralized control by a DBA
avoids unnecessary duplication of data & reduces total amt of data
storage.
Integrity : accurate & consistent. e.g. : age
Security : Confidential data must not be accessed by unauthorized
user. Proper procedures are followed including proper
authentication.
Conflict Resolution : Database is under the control of DBA. So
he /she resolve conflicting requirements of various users &
applications
Database
db.
Uses simple structure .
Many users of the database system they do not all this
information, they need to access only a part of the db.
The db system provide many views for the same db.
Instances & Schema :
The collection of information stored in the db at a particular
moment is called “Instance of the db”.
The overall design of the database is called “Schema”
Physical Schema : Describes the db design at physical level.
Logical Schema : Describes the db design at the logical level.
Sub Schema :
The db have several schema at the view level.
Describes different view of db.
Data Independence :
Data Independence is the ability to change the schema at one
level of the database system without having to change the
schema at the other levels.
Logical Data Independence :
It is the ability to change the conceptual schema without
affecting the external schemas or application programs.
The conceptual schema may be changed due to reason
Change in constraints
Addition of new data item
Removal of existing data item from the database.
Physical Data Independence
It is the ability to change the internal schema without changing the
external schema.
An internal schema may be changed due to several reasons
Using New Storage devices
Using different Data Structures.
Switching from one access method to another.
Using different file organization or storage structure .
Modifying Indexes.
Logical data independence is more difficult to achieve than the
physical data independence, because the application programs
are always dependent on the logical structure of the database.
Insertion :
r r∪E
Where r is a relation
Functional Dependencies
Functional dependency describes the relationship between
attributes in a relation.
Let R be the relation, and let x and y be the arbitrary subset of
the set of attributes of R. Then we say that Y is functionally
dependent on x – in symbol.
XY
(Read x functionally determines y) –
If and only if each x value in R has associated with it precisely
one y value in R
In other words
Whenever two tuples of R agree on their x value, they also agree
on their Y value.
Product table
One FD : - ( { S#} {City})
Because every tuple of that relation with a given S# value also
has the same city value.
TRIVIAL DEPENDENCIES
One-way to reduce the size of the set of FD we need to deal with
is to eliminate the trivial dependencies.
Trival functional dependency means that the right-hand side
is a subset ( not necessarily a proper subset) of the left-hand side.
A functional dependency X Y is trivial if Y is a subset of X
e.g. <S#, P#> <S#>. (Trivial)
{name, supervisor_id} {name}
staffNo, sName sName
staffNo, sName staffNo
They do not provide any additional information about possible
integrity constraints on the values held by these attributes.