Вы находитесь на странице: 1из 3

Chapter 13

Data
Collect about people, place and event in reality and eventually store in database.

Data Storage
Available; accurate & consistent.
Must efficient store, update and retrieve.

2 approaches data storage in computer based system:


- store data in individual file (unique used in particularly application)
- store data in a database (centrally controlled store of data, intended to used in
different application)

Objectives of database
-ensure data can be shared for variety of current and future application
-maintain data accurate and consistent

Metadata
Data about data in file or database./ Data describe data
Include description of what value of data item looks like.

Key types:
1) Primary key - unique attribute for record
2) Candidate key - an attribute or collection of attribute serve as a primary key
3) Secondary key - key not unique; used to select a group of record
4) Composite key - combination of two or more attributes representing a key

Attribute = characteristic of entity


Records = collection of data have something common to describe entity
Key = item to identify record

Master File (long period)


- contain all record and information of entity
Create Master File
Each master table or database should have programs to create, read or update
and delete record
Specific data field should exist one master data

Table Files (long period)


- contain data used to calculate more data and performance measure; usually
read only by a program

Transaction file
- change/ update of masterfile

Report file
- use when necessary to print report when no printer available
- eg user take file to another computer system / devices

3 structure storing database


-relational database structure - data store in many table
-hierarchical database structure
- network base database structure

Normalization = transform data stores to smaller, stable & easily maintain data
structures to simplify all complex data item found in user view.
3 major step: 1.remove repeating grp & identify primary key 2. remove partial
dependencies 3. remove all transitive dependencies
1NF - remove repeating grp, primary repeating grp attributes are move into a new
table. If relation contain no repeating grp it is 1NF
2NF - remove any partially dependent (data dependent part of primary key)
attributes and place them in another relation. Relation is created for data that are
only dependent on part of the key and another for dependent on both parts.
3NF -remove any transitive dependencies. A transitive dependencies is when non
key attribute are dependent not only on primary key but also on a nonkey
attribute.

Entity integrity - the primary key cnt have null value; if primary key is composite
key none of the fields in the key contain a null value

Referential integrity - governs the nature of records in one to many relation;


foreign key in child table must match with parent . Implications: cnt add child
table without match with parent, cnt change a primary key that has matching
child table record & cnt delete record that has child record
Implement in 2 ways: 1.restrict database update or deletes a key only if nt
match 2. a cascaded database will delete or update child record when a parent
record is deleted or change

Domain integrity - use to validate data; has 2 forms: 1.check contraints which are
defined at table lvl and rules which are defined seperately and can be used within
a number of field.

Anomalies:
1. Data redundancy: same data store in more than one place in database. Solve
by creating table that are in 3NF
2. Insert Anomaly: occurs when entire primary key is not know and database cnt
insert a new record which violate entity integrity (can be avoided by using
sequence number for primary key)
3. Deletion Anomaly: happen when deleted loss of related data
4. Update anomalies: change attribute influence database either contain
inconsistent data or multiple records need changing (maybe prevent by makesure
table in 3 NF)

Denormalization: process taking the logical data model and transforming it into an
efficient physical model

Differences DATA WAREHOUSE and DATABASE


-data warehs used to organize info for quick and effective queries
-data warehs is organize around major subjects
-data warehs store summarise data rather than raw data
- data warehs cover a much longer time frame than traditional transaction
oriented database.
Chapter 15

Вам также может понравиться