Module 1: Introduction to Databases and Transactions Flashcards
Is shared collection of logically related data (and a description of this data), designed to
meet the information needs of an organization
Database
Database is composed of:
Entities and Relations
Is a collection of application programs that perform services for the end users
such as the production of reports
File-based System
5 Limitations of the File-based Approach
- Separation and Isolation of Data
- Duplication of Data
- Data Dependence
- Incompatible File Formats
- Fixed Queries/Proliferation of Application Programs
The Limitations of the File-based Approach can be attributed to two factors:
- Definition of data embedded in the application programs, rather than being stored separately
and independently - There is no control over the access and manipulation of data beyond that imposed by the
application programs
- Is software designed to assist in maintaining and
utilizing large collections of data - A general-purpose software system that facilitates the processes of defining,
constructing, & manipulating databases for various applications
Database Management System or DBMS
A database involves specifying the data types, structures, and constraints for the
data to be stored in the database
Defining
The database is the process of storing data itself on some storage medium that
is controlled by the DBMS
Constructing
A database includes such functions as querying the database to retrieve specific
data, updating the database to reflect changes in the miniworld, & generating reports from
the data
Manipulating
Is a software that enables user to define, create and maintain that database and which
provides controlled access to the database
DBMS
DBMS provides the following facilities:
- Allows users to define the database through DDL (Data Definition Language)
- Allows user to insert, update, delete and retrieve data through DML (Data Manipulation
Language) - Provides controlled access to the database.
Provides controlled access to the database
DBMS
DBMS may provide:
- A security system, which prevents unauthorized users from accessing the database
- An integrity system, which maintains the consistency of stored data
- A concurrency control system, which allows shared access of the database
- A recovery control system, which restores the database to a previous consistent state following a hardware or software failure
What are we going to cover?
- How do we represent the world with a database?
Database Design and Application Development
What are we going to cover?
- How can we answer questions about enterprising this data?
Data Analysis
What are we going to cover?
- How does a DBMS allow many users to access data concurrently, and
how does it protect against failures?
Concurrency and Robustness
What are we going to cover?
- How does the database cope with large amounts of data?
Efficiency and Scalability
Who created the first general purpose DBMS Integrated Data Store, where and when?
Charles Bachman; at GE; early 1960s
It creates the basis for the network model (standardized by CODASYL)
DBMS Integrated Data Store
Develops the Information Management System (IMS)
IBM
_____ uses and alternate model, called the _____.
Information Management System (IMS); Hierarchical Data Model
Is created around IMS
SABRE
Who from IBM creates the relational data model and when?
Edgar Codd; 1970
In _____, Codd receives the _____
for his contributions to database theory.
1981; Turing Award
In _____, _____ developed by IBM, becomes the standard query language for databases
1980s; SQL
SQL is
standardized by
ISO
In _____ and _____, IBM, Oracle, Informix and others develop powerful _____.
1980s and 1990s; DBMS
In the _____, DBMS are showing how useful they can be.
Internet Age
4 Forms of Data
- Text
- Image
- Audio
- Video
4 Data Sources
- PC
- Web
- Phone
- Bar Code
- Are data that describe the properties of data (but do not include that data)
- Allow database designers & users to understand what data exist, what the data mean
and what the fine distinctions are between seemingly similar data items
Metadata
12 Advantages of Why we use DBMS
- Control of data redundancy
- Data consistency
- Sharing of data
- Data integrity and security
- Enforcement of Standards
- Economy of scale
- Balanced conflicting requirements
- Data independence
- Efficient data access
- Data administration
- Concurrent access and crash recovery
- Reduced application development time
7 Disadvantages of Why we use DBMS
- Complexity
- Size
- Cost of DBMS
- Additional hardware costs
- Cost of conversion
- Performance
- Higher impact of a failure
- Is responsible for the management of the data resource including database planning, development
and maintenance of the standards, policies and procedures and logical database design - Consults with and advises senior managers, ensuring that the direction of database development will
ultimately support corporate objectives
Data Administrators
Is responsible for the physical realization of the database system, including physical database design
and implementation, security and integrity control, maintenance of the operational system and
ensuring satisfactory performance for the applications and users.
Database Administrators
Two Types of Designers
- Logical Database Designer
2. Physical Database Designer
- Is concerned with identifying the data, the relationships between data and the constraints on
the data that is to be stored in the database. - Must have a thorough and complete understanding of the organization’s data andof the
business rules.
Logical Database Designer
Takes the logical data model and decides how it is to be physically realized
Physical Database Designer
Physical database designer involves:
- Mapping the logical data model into a set of tables and integrity constraints;
- Selecting specific storage structures and access methods for the data to achieve
good performance for the database activities; - Designing any security measure required on the data.
- Responsible in the implementation of the application programs that provide the required
functionality for the end users. - Work from the specification produced by systems analyst.
Application Programmers
- Are the clients for the database – the database has been designed and implemented, and is being maintained to server their information needs.
End Users
End users can be classified according to the way they use the system:
- Naive Users
2. Sophisticated Users
- Are typically unaware of the DBMS.
- They invoke database operations by entering simple commands or choosing options
form a menu.
Naive Users
- Familiar with the structure of the database and the facilities offered by the DBMS.
- May use a high-level query language such as SQL to perform the required operations.
Sophisticated Users
Is a collection of high level description constructs that hide many low-level
storage details
Data Model
Most current DBMS use the _____.
Relational Data Model
The central data description in this model is the _____ (_____ - same as in set theory mathematics).
Relation; A Set of Tuples
For convenience, we refer to each tuple as a _____.
Row
Is a description of the data in terms of the data model
Schema
In the relational model the
schema looks like:
RelationName(field1 : type1, …, fieldn : typen)
- Is the abstract graphical representation of an enterprise
- Usually the beginning of database development
Enterprise Data Model
Is language-independent. It can be drawn using a pen and a paper.
Data Modeling
Purpose of Enterprise Data Model
It creates an overall picture or explanation of organizational data NOT the design of the database
4 Data Modeling Tools
- Entity Relationship Diagram
- Unified Modeling Language
- Data Flow Diagram
- Data Dictionary
6 Components of Information System Architecture (ISA)
- Data
- Processes
- Network
- People
- Events and Point in Time
- Reasons
Component of Information System Architecture that may be represented as ERD
Data
Component of Information System Architecture that manipulate data; represented by DFD, object-models with methods or other notations
Processes
Component of Information System Architecture that transports data around & between organizations and business partners
Network
Component of Information System Architecture that the source & receiver of data / information and performs processes
People
Component of Information System Architecture that shows when processes are performed (e.g State-Transition
Diagrams)
Events and Point in Time
Component of Information System Architecture that shows events & rules governing the processing of data. Some diagramming
tools exist for rules (e.g decision tables)
Reasons
It is a formal methodology in creating and maintaining information system
Information Engineering
2 Classifications of Information Engineering
- Bottom-up Planning
2. Top-down Planning
Projects are requested by IS users who need certain info to do their job
Bottom-up
Generic IS planning methodology that attempts to gain a broad understanding of the IS needs of
the entire org
Top-down
4 Steps of Top-down
- Planning
- Analysis
- Design
- Implementation
Results in an IS architecture, including an enterprise model (INFO. SYSTEM PLANNING)
Planning
Is the road map setting the direction of systems development
Information System Planning (ISP)
The Goal of Information Systems Planning
To align IT with the business strategies of the organization
Goal: Business Alignment Steps:
- Identify strategic planning factors
- Identify corporate planning objects
- Developing an enterprise model
Goal: Business Alignment Steps:
- Goals
- Critical Success Factors
- Problem Areas
Identify Strategic Planning Factors
Goal: Business Alignment Steps:
- Identifying corporate planning objects is also called as enterprise analysis.
- It requires the analysis of organization-wide information requirements in terms of organizational units, functions and processes and information requirements
Identify Corporate Planning Objects
Are various departments, branches or program areas in the
organization
Organizational Units
Geographic locations of business units where business
operations occur
Organizational Locations
Related groups of business processes that support the mission of the organization
Business Functions
Major categories of data about people, places, events & things managed by the organization. Key attributes are also discussed in this section
Entity Types
Application software & supporting procedures for handling sets of
data
Information System
Goal: Business Alignment Steps:
Contains:
- Functional decomposition
- Entity Relationship Diagram
- Planning matrix
Developing an Enterprise Model
Process of breaking down the functions of an organization into progressively greater level of details
Functional Decomposition
Used to describe Enterprise model by depicting the entity types, relationships between entities & how business operates. (BUSINESS RULES - govern the validity of data)
Entity Relationship Diagram
Shows Inter-relationships between planning objects
Planning Matrix
8 Alternative Systems Building Approaches
- Traditional Systems Development Lifecycle
- Rapid Application Development (RAD)
- Prototyping
- Computer-Aided Software Engineering Tools
- Integrated-CASE (I-CASE) Tools
- Application Software Packages
- Outsourcing
- End User Development
– Also known as the SDLC
– Methodological, Highly Structured
– Includes many checks & balance
Traditional Systems Development Lifecycle
– Iterative process of rapidly repeating analysis, design & implementation steps until desired system is acquired
Rapid Application Development (RAD)
RAD works best when:
- Most of the database needed already exists
- Systems that primary retrieve data
– Process of building experimental system quickly and inexpensively for demonstration &
evaluation
– Iterative
– May be used as an alternative to the systems development life cycle
Prototyping
Software that provides automated support for some portion of the systems development process
Computer-Aided Software Engineering Tools
3 Features of Computer-Aided Software Engineering Tools
- Ability to draw data models using entity relationships & other notations (ensures consistency
across diagrams) - Ability to generate codes (database definition commands to be given to DBMS)
- Information Repository
- Provides support across whole life-cycle but such tools are rarely used since they tend to be strong in supporting certain phases but weak in supporting other phases of the system
- Created as case tool that has the ability to share the metadata that are developed during each stage of the process
Integrated-CASE (I-CASE) Tools
Set of prewritten, precoded application software programs commercially available for sale or lease.
Application Software Packages
Application Software Packages requires _____.
customization
Contracting computer center operations, telecommunications networks, or applications development to external vendors
Outsourcing
- Development of information systems by end users with little or no formal assistance from technical specialists
- Allows users to specify their own business needs
End User Development
Describes the data stored in the database
Conceptual Schema
Creating a good conceptual schema is not a simple task, and it is called _____.
Conceptual Database Design
Conceptual Database Design involves:
- Determining the different relations needed
- The number of fields per relation
- The type of each field
Specifies how the relations are actually stored in secondary storage devices
Physical Schema
Physical Schema also specifies _____ used to speed up the access to the relations
Auxiliary Data Structures (Indexes)
Decisions about the physical schema depend upon:
- Understanding how the data is going to be accessed
- The facilities provided by the DBMS
2 Examples of Physical Schema
- Store all relations in unsorted files of records
2. Create indexes in the first column of every relation, and in the sal column of faculty
Is a refinement of the conceptual schema
External Schema
Every database has _____ conceptual and _____ physical schema, but it can have _____ external schemas
one; one; many
Each external schema:
Users
External Schema is tailored to a particular group of users consists of _____ of the conceptual schema
one or more views and relations
Is conceptually a relation, but its records are not stored in the database; instead, they are computed from other relations.
View
Means that programs are isolated from changes in the way the data is structured and stored.
Data Independence
Users are shielded from the logical structure of the data (e.g. a relation is split into 2 or more)
Logical Data Independence
As long as the conceptual schema remains the same, we can change the storage details of the application without affecting the user
Physical Data Independence
Example of External Schema
CourseInfo(cid: string, fname: string, enrollment: integer)
Data for an IS may reside in _____ to balance various organizational and technical factors
multiple locations or tiers of computers
Three-tier Database Architecture:
- Desktop or laptop computer which concentrates on managing the user-system interface and localized data
Client-tier
Three-tier Database Architecture:
- Performs calculations and provides access to data shared within the workgroup
Department (Workgroup) Minicomputer Server Tier
Three-tier Database Architecture:
- Performs sophisticated calculations and manages the merging of data from multiple sources across the organization
Enterprise Server (Minicomputer or Mainframe) Tier
_____ in which database SW on a server (called _____) performs database commands sent to it from client workstations and application programs on each client concentrate on user interface functions
LAN-based Environment; Database Server or Database Engine
5 Advantages of LAN-based Environment
- Allows for simultaneous processing on multiple processors for the same application.
- Possible to take advantage of the best data processing features of each computer platform.
- Can mix client tech (kiosks, networked PCs) while sharing common data.
- Processing can be performed close to source of processed data thus improving response times & reducing network traffic.
- Allows open-system standard.
Why do we need a DBMS?
To answer queries
A _____ provides a specialized language, called _____ to ask questions to the DBMS
DBMS; Query Language
When several users access (and possibly modify) a database concurrently, the DBMS must order their request carefully to avoid _____
conflicts
DBMS should also protect users from _____.
system failures
DBMS should deal with crashes in the _____ of a _____.
middle; transaction
Is a conceptually indivisible group of operations that a user wants to perform (for example, getting transferring money from one account to another)
Transaction
An important task of a DBMS
Is to schedule concurrent accesses in a way that every user can ignore the fact that others are accessing the data at the same time
A DBMS allows user to think that their programs are executed in _____
isolation
Has to be implemented to allow transactions to be interleaved
Locking
Allow several transactions to hold (and access) an object at the same time
Shared Locks
Only one transaction can hold the object
Exclusive Locks
The DBMS maintains a _____ of everything it writes
log
The log is created _____ the operation is done: _____
before; write-ahead log
Example of a Conceptual Schema
Students(sid:string, name: string, login: string, age: integer, gpa: integer,gpa: real)
Faculty(fid: string, fname:string, sal: real)
Courses(cid: string, cname: string, credits: integer) Teaches(fid: string, cid: string)
Enrolled(sid: string, cid: string, grade: string)
Relational Data Model Example (A Relation of Students)
Students(sid : string, name : string, age : integer, gpa : real)
File-based Sample for Sales Files
Property_for_Rent (Property Number, Street, Area, City, Post Code, Property Type, Number of Rooms, Monthly Rent, Owner Number)
Owner (Owner Number, FirstName, LastName, Address, Telephone Number)
Renter (Renter Number, FirstName, LastName, Address, Telephone Number, Preferred Type, Maximum Rent)
File-based Sample for Contracts Files
Lease (Lease Number, Property Number, Renter Number, Monthly Rent, Payment Method, Deposit, Paid, Rent StartDate, Rent Finish Date, Duration)
Property_for_Rent (Property Number, Street, Area, City, Post Code, Property Type, Number of Rooms, Monthly Rent, Owner Number)
Renter (Renter Number, FirstName, LastName, Address, Telephone Number, Preferred Type,
Maximum Rent)
File-based Sample for The Personnel Department also Stores Staff Details, namely:
Staff(Staff Number, FirstName, LastName, Address, Telephone Number, Position, Sex, Date of Birth, Salary, National Insurance Number, Branch Number)
Can present a consistent, unchanging picture of the structure of the database, even if the underlying database is changed (for example, fields added or removed, relationships changed,
files split, restructured or renamed).
View
If fields are added or removed from a file, and these fields
are not required by the view, the view is _____.
not affected by this change
A view helps provide
the _____.
Program-data Independence