Академический Документы
Профессиональный Документы
Культура Документы
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.
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
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
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
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