Fundamentals Flashcards
Database
Structured set of data that is accessible in many ways
A collection of tables and their relationships
(Data + rules on data)
(can run multiple queries without affecting the data structure)
Data Anomalies
Data management problems resulting from poor data structure
Insert Anomaly
Error prohibiting insertion
Update Anomaly
Error from updates OR when multiple updates are required
Risk of missing some items
Delete Anomaly
Deletes other info
Solving poor database structure
Separate data into different tables BUT keep relationships the same
Adding a redundant column removes anomalies (only in relational database)
E. F Codd
A relational Model of Data for Large Shared Data Banks
Donald Chamberlin & Raymond BOyce
SEQUEL /SQL (Structured English Query Language)
Peter Chen
The entity-relationship model-toward a unified view of data
Larry Ellison
Oracle
Jim Gray
The Transaction Concept Virtues and Limitations
Database Management System
A software package which allows to define, store, use and maintain a database
Database System
Database Management System (DBMS) + Database
Hardware + Software (OS, DBMS, Application programs and utility) +
People +
Procedures +
Data
Problems with file approach to data management
- Redundant data => waste of storage space
- Inconsistent data
- Strong dependency between applications and data
- Concurrent actions lead to inconsistent state of data
- Difficult to integrate various applications
Types of Data
Raw & Metadata
Metadata
Data descriptions
Stored in data dictionary in DBMS
Database vs File Approach
DBMS manages both and metadata in catalog
Application-data independence
View (data subset) can be defined
Concurrency control to support multiple users
File Approach
File only contains data; metadata stored in applications
Application - structural data dependence (need to code to retrieve new information)
No views possible (unless duplication)
No multi user support
Lengthy development times
Complex system administration
Data model
A clear description of the data concepts, their relationships and various data constraints that together make up the content of the database
Should provide a formal and perfect mapping of the real world
Conceptual Data Model
High - level data concepts, close to how the business user perceives the data
Logical Data Model
Concepts that may be understood by business users but are not too far removed from physical data organisation
Physical Data Model
Low- level concepts that describe the datas physical storage details
Database schema
Conceptual organisation of the entire database as view by the database administrator
Specified during database design
Not expected to change frequently
Stored in the catalog
Database state
The data in the database at a particular moment (set of instances)
Changes on ongoing basis
The three - schema architecture
External Schema
Conceptual Schema
Internal Schema
Changes in one layer should have minimal impact on the others
External Schema
Describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group
Conceptual Schema
Specifies data concepts, characteristics, relationships, integrity rules and behaviour
Internal Schema
Specifies how the data are stored/ organised physically (e.g. indexes, access paths)
Benefits Three-Schema Architecture
- Efficiency (size)
- Maintainability (ease of updating, reduces redundancy)
- Performance (importance of data)
- Security (sensitive information, authorisation)
Data Dictionary / Catalog
Heart of DBMS
System database with metadata
Contains definitions for external schema, conceptual schema and physical schema
Database Designer
Designs conceptual schema
Database administrator
Designs external and physical shcema
Application Developer
Develops database applications in a programming language
Business user
Makes use of data stored in database via applications (makes queries on the database)
DBMS vendors
Companies selling DBMS i.e. Oracle, Microsoft
Data Definition Language (DDL)
Language used by the database administrator (DBA) to define the database’s logical, internal and external schemas
Data Manipulation Language (DML)
Language used to retrieve, insert, delete and modify data
DML statements can be embedded in a general-purpose programming language or entered interactively through a front-end querying tool
Relational Database Systems (RDBMS)
Stores data in tables so it can be used in relation to other stored databases
SQL is both a DML & DBA in RDBMS
Data and functional independance
Changes in data definitions have minimal to no impact on applications
Physical (computer) Data Independance
Neither applications nor external or conceptual schema must be changed when changes are made to data storage specifications i.e. different storage locations
DBMS provides interfaces between the conceptual and physical data models
Logical (human) Data Independance
Software applications are minimally impacted by changes in the conceptual schema
i.e. adding new data concepts, characteristics, relationships
DBMS provides interfaces between conceptual and external schema