Midterm Flashcards
What are key differences between databases and file systems?
Data separation and isolation – file systems store in separate files, special programs must be written; databases store all data together and has algorithms to automatically relate and combine data
Data duplication – in files, data is often duplicated, difficult to update; in databases, there is minimal data duplications
Program/data independence – in files, if a file structure is updated, all programs must be updated. In databases , the format is stored as part of the db, and application programs only need to identify data needed, DBMS does access
File compatibility – files may have to be changed to compatible format, DMBS does all the data access not programs
Ability to Represent the User’s Perspective of Data – in files, separate files don’t store relationships, Databases store relationships
Disadvantages to file systems
Application program dependency
Data duplication
Separated and isolated data
Long development times
Increased maintenance requirements
Properties/Definition of a Relational Database
Shared, Self Describing, Organized Collection of Logically-Related Persistent Data
Possible types of data that can be stored in a database
Text
Numbers
Date/Time
Graphics and images
Sound and video
Programs and other objects
What are the four components of a relational database?
Application metadata – data about the structure of forms, reports, and queries
Metadata - data about the structure of the DB
Index – an index aids in searching
User data – data tracked by users
Database Management System (DBMS)
A DBMS is a data storage and retrieval system which permits data to be stored non- redundantly while making it appear to the user as if the data is well integrated.
To implement a database schema a Database Management System must be used.
What are the three DBMS subsystems and their purpose?
Design Tools subsystem = software that is used to create tables, forms, queries, and reports; provides interfaces for built-in programming languages.
Run-Time subsystem = processes the components created w/Design Tools; executes & displays data in forms, etc. & provides access for standard
programming languages (C++, Java, etc.).
DBMS engine = software that facilitates the transfer of data between the database and the design and run-time subsystems: handles requests to access the database tables, does transaction management, record locking, backup & recovery.
Disadvantages of databases
Database Administrators (DBAs) and other specialized personnel
needed
Installation and management costs
Conversion costs
Need for explicit backup and recovery
Political problems / organizational conflict
Summary steps of database development lifecycle
- Create a Data Model from gathered requirements -Entity-Relationship Model
- Transpose Data Model into Relation(s)
- Normalize Relations
- Create the Relational Schema within Database Management System.
(Metadata) - Define forms, queries, reports, menus, if supported within DBMS or
external application programs. - Populate with User Data.
- Maintenance
DBMS independent vs dependent
independent -> HIGH-LEVEL or conceptual level (e.g., E-R diagram)
dependent -> LOW-LEVEL or physical level(e.g., file layouts/structures,
indexing, OS access strategies)
DBMS
Data Modeling
define the logical structure of a database and are the fundamental entities used to introduce abstraction in a DBMS. Data models define how data are connected to each other and how they are processed and stored inside
the system.
Used as a means of communication between database developer and client
What is an attribute?
data item that is used to describe an entity.
show by ovals and connected to the entity rectangle with a line
Store vs derived attr
Stored – actually stored
Derived – the data value is calculated (dotted circle) age (calc by DOB)
What is an entity class?
Something the user wants to track.
Typically nouns.
Represented by a rectangle with a singular name
What is an entity instance?
The actual occurrence of the data
Usually never shown
Simple vs Composite attributes
Simple – composed of one piece of data
composite – an attribute composed of other attributes (like an address)
Not shown in crow’s foot notation
Single vs mutli-valued attr
Single – one single piece of value
Multi (double circle) – an attribute that stores multiple data values (skills = carpentry, plumbing, painting)