Database Theory and Design Flashcards
Define a Database (DB)
An organized collection of related data
Define a Database Management System (DBMS)
Software that manages and controls access to the database
Define Database application
Program that interacts with the database at some point in its execution
Define a Database System
A collection of programs that interact with the database
What are two ways of storing and managing data?
- File-based System
- Database System
Define a File-based System
A collection of application programs that perform services for the end-users. Each program defines and manages its own data.
Define a Database System
A shared collection of logically related data and its description, designed to meet the information needs of an organization
What are the advantages of a File-based approach?
User Control
- End user has total control of the stored data
- Can modify application or data at will
Applications and data file can be optimised for particular tasks
What are the disadvantages of a File-based approach?
- Data duplication
- Data dependence
- Incompatible file formats
- Proliferation of application programs (APPS)
What is Data Duplication
If a record is duplicated in each of the 3 files, a change to the record requires a change to all 3 files.
Integrity of student records may be compromised if the files are not all updated - which file holds the correct information.
What is Data Dependence
The way data is stored affects how it can be used, making the data and the program tightly connected
What are imcompatible file formats
If application programs are separatly implemented to data files, then the data files may be incompatible with the application program
Meaning the data files would have to be translated to fit the application program
What is the Proliferation of application prgorams?
If you wanted more information out of data files than initially anticipated
You would have to add more application programs to handle new queries
Leading to the proliferation of files and application programs that each official has to handle
How does a database approach address the limitation of an application program?
The data is stored in a DB, which is then accessed by DBMS.
When officials need info from the DB they write queries in SQL to communicate with the DBMS which in turn gives them what they need
What is a DBMS
Software that interacts with usersβ application programs and the DB
Define a Database Management System (DBMS)
Software system that enables the user to define, create, maintain and control access to the database
What does an End-user do?
Run applications to perform specific database operations
What does an Application Developer do?
Use a programming language to provide the required functionality for the end users
What does a Database Designer do?
Identify the data, relationships between data, constraints on the data
Map the logical design into a set of tables & integrity constraints, select straoge structures & access methods
What does a Database Administrator (DBA) do?
Responsible for implementation and monitoring of the database
What are the 13 advantages of a DBMS?
- Control of data redundancy
- Data Consistency
- Sharing of data
- Improved data integrity
- Improved Security
- Enforcement of Standards
- Economy of Scale
- Balance of conflicting requirements
- Improved data accessibility and responsiveness
- Increased Productivity
- Improved maintenance through data independence
- Increased concurrency
- Backup and Recovery services
What is Control of Data Redundancy?
Since all data is now stored in a single database, there are no unnecessary multiple copies of data
What is Data Consistency?
Only one copy of each data item
(changes only have to be made to 1 item, therefore if there was multiple and they werent all changed data wouldnt be consistent)
What is Sharing of data?
Since data is common to the organization, itβs easy for all authorized users to have access to the same data
What is improved data integrity?
Organizational data is soted in one place, itβs easy to enforce consistency rules that shouldnβt be violated
What is improved security?
Database administrator can easily put in place security and access measures by simply enfrocing these using the DBMS
What is Enforcement of Standards?
Since all data is in the same database, its easy to enforce data standards such as:
- Data formats
- Naming conventions
- Documentation standards
- Update procedures
- Access rules
What is Economy of Scale?
Combining an entire organizationβs data into one database and creating a set of applications that wokr on this one source results in saving costs
What is the Balancing of conflicting requirements?
Since the DBA has an organizational-wide view of all operations, they can optimize the design and operational use of the database to provide the best use of resources as a whole as opposed to satisfying one department at the expense of another
What is improved data accessibility and responsiveness?
Common database provides easy data access to all authorized people within orgranization
Also, the DBMS provides SQL to enable end-users to easily construct ad hoc queries without detailed programming knowledge
What is increased productivity?
The DBMS provides all low level file handling routines that are typically written in application programs
They also typically provide SQL enabling users to develop queries themselves
Altogether, this reduces programming effort
What is improved maintenance through data independence?
A DBMS separates data management from application programs
- so if changes are made to underyling data structure, the DBMS doesnt have to change application programs.
The DBMS will provide the necessary mapping between application programa and data stored on the database
What is increased concurrency?
Many DBMSs allow users to access the database simultanoeusly without any conflict
What are Backup and recovery services?
DBMS have facilities to enable data recovery following a failure
They can slo automatically backup the data stored in the database
What are the disadvantages of a DBMS?
- Complex: require those using them to fully understand them
- Size: Large piece of software that requires alot of memory to run
- Cost of DBMS: Cost varies depending on if its single user or a big
organization. Maintenance and operations costs also need to be
factored. - Cost of conversion: Data conversion costs as well as training and
recruiting costs - Performance: Written for general use, so some applications arenβt
as fast - Greater impact of failure: Centralization increases system vulnerability. Failure may result in everyone being affected in an organization
What are the 3 levels in Three-level Architecture?
External Level
- The way users percieve data
Conceptual Level
- Provide both the mapping and desired independence
Internal Level
- The way DBMS and the OS perceive the data
What are the two objectives of Three-level Architecture?
- Data Abstraction
- Data Independence
What is Data Abstraction?
Hide storage details and present the usres with a conceptual view of the database
What is Data Independence?
The capacity that upper levels are unaffected by changes to lower level
What is Logical Data Independence?
Change conceptual schema without having to change external schemas and their application programs
What is Physical Data Independence?
Change internal schema without having to change conceptual schema
What is a Database schema?
The description of the structure of the database
What is a Database state?
The content of a DB at a moment in time