All Flashcards
Get Smarter Yo
What is a database?
A shared collection of logically related data designed to meet needs of organisation
What is a system catalog (metadata)?
Provides description of data to enable program-data independence
What defines logically related data?
Comprises of entities, attributes, and relationships of an organisations information
What is a Database Management System?
Software system enabling users to define, create, maintain and control access to a database
What control services does a DBMS provide? (4 total)
A security system
An integrity system
A concurrency control system
A user-accessible catalog
What services does a DBMS provide? (10 total)
Data storage, retrieval and update User-accessible catalog Transaction support Concurrency control services Recovery services Authorisation services Support for Data Communication Integrity Services Services to promote data independence Utility services
What advantages does a DBMS provide? (14 total)
Control of data redundancy Data consistency More information from same amount of data Sharing data Improved data integrity Improved security Enforcement of standards Economy of scale Balance conflicting requirements Improved data accessibility and responsiveness Increased productivity Improved maintenance through data independence Increased concurrency Improved backup and recovery services
What disadvantages does a DBMS bring with it? (7 total)
Complexity Size Cost Additional hardware costs Cost of conversion Performance Higher impact of failure
What is a DB Application Program?
A computer program that interacts with a DB by issuing an appropriate request to the DBMS
What does a Data Definition Language do?
A DDL permits specification of data types, structures and any data constraints
What does a Data Manipulation Language do?
A DML is a general enquiry facility, a query language, of the data, providing basic manipulation operations on data in the DB
What defines a procedural DML do?
Allows users to tell system exactly how to manipulate the data
What defines a Non-Procedural DML?
User states what data is needed, not how to retrieve it
What is a data model?
An integrated collection of concepts for describing data, relationships between data, and constraints on the data in an organisation
What components make up a data model? (3 total)
Structural part
Manipulative part
Possibly a set of integrity rules
What is the purpose of a data model?
Provides a way to represent data in an understandable way
What categories of data model are there? (3 total)
Object Based
Record Based
Physical
What is a system catalog? ( 2 points)
A repository of information, or metadata, describing the data in the DB and a fundamental component of any DBMS
What is middleware?
Software that mediates with other software and allows for communication between disparate applications in a heterogeneous system
When is middleware needed?
When distributed systems become too complex to manage efficiently without a common interface
What is a Web Service?
A software system designed to support interoperable machine-to-web service machine interaction over a network
What does XML stand for?
Extensible markup language
What does SOAP stand for?
Simple object access protocol
What does SOAP do?
Platform and language independent communication protocol for exchanging structured information over the internet and based on XML.
What does WSDL stand for?
Web services description language
What does WSDL do?
Protocol based on XML and used to describe and locate web services
What does UDDI stand for?
Universal discovery, description and integration
What does UDDI do?
Platform independent, XML based registry protocol for businesses to list themselves on the internet
What is a distributed database?
A logically interrelated collection of shared data, physically distributed over a computer network
What is the cloud computing?
A model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort or service provider interaction.
What is a transaction?
An action or series of actions carried out by a user or applications, which reads or updates DB contents, forming a logical unit of work on the DB
What do each of the ACID properties stand for, and what do they mean?
Atomicity
Transactions treated as single unit
Consistency
Transactions only bring DB from one valid state to another
Isolation
Ensures concurrent execution of trans leaves DB in same state as if they were executed sequentially
Main goal of concurrency control
Durability
Guarantees transaction remains committed, even after system failure
What are the objectives of a Three-Level Architecture? (6 total)
- All users should be able to access the same data
- A users view is immune to changes made in other views
- Users should not need to know physical DB storage details
- DBA should be able to change DB storage structures without affecting users’ views
- Internal structure of DB should be unaffected by changes to physical aspects of storage
- DBA should be able to change conceptual structure of DB without affecting users’
What is the external level and what does it describe?
- Users view of the DB
* Describes part of the DB that is relevant to a particular user
What is the conceptual level and what does it describe?
- Community view of the DB
* Describes what data is stored in DB and relationships among data
What is the internal level and what does it describe?
- Physical representation of the DB on a computer
* Describes how the data is stored in the DB
What does logical data independence provide? (3 total)
- Immunity of external schemas to changes in conceptual schema
- Conceptual schema changes
- Shouldn’t require changes to external schema or rewrites of application programs
What does physical data independence provide? (3 total)
- Immunity of conceptual schema to changes in internal schema
- Internal schema changes
- Shouldn’t require changes to conceptual or external schemas
What defines an object based data model? (4 total)
- Entity relationship
- Schematic
- Functional
- Object-Oriented
What types of record based data model exist? (3 total)
- Relational Data Model
- Network Data Model
- Hierarchy Data Model
What information does a system catalog store? (5 total)
- Names, types and sizes of data items
- Constraints on the data
- Names of authorised users
- Data items accessible by a user and the type of access
- Usage statistics
In a multi-user DBMS architecture, what defines teleprocessing? (3 total)
- One computer with a single CPU and a number of terminals
- Processing performed within the same physical computer
- Terminals are ‘dumb’, incapable of functioning on their own, cabled to central computer
In a multi-user DBMS architecture, what defines a file-server architecture? (4 total)
- Processing distributed about the network, typically a local area network
- File server connected to several workstations across a network
- DB resides on the file-server
- DBMS and applications run on each workstation
What are the disadvantages of a file-server mulit-user DBMS architecture? (3 total)
o Significant network traffic
o Copy of DBMS on each workstation
o Concurrency, recovery, and integrity control more complex
What defines each of the tiers in a two-tier client server architecture?
- Tier 1: Client manages UI and runs applications
* Tier 2: Server holds DB and DBMS
What are the advantages of a two-tier client server? (5 total)
o Wider access to existing DBs o Increased performance o Possible reduction in hardware costs o Reduction in communication costs o Increased consistency
What makes a three-tier client server better than a two-tier server DBMS architecture?
Much more scalable compared to the two-tier client server system
What are the advantages of a three-tier client server? (5 total)
o ‘Thin’ client requiring less expensive hardware
o Application maintenance centralised
o Easier to modify or replace one tier without affecting others
o Separating business logic from DB functions makes it easier to implement load balancing
o Maps quite naturally to Web environment
What defines an n-tier architecture?
Application servers host API to expose business logic and business processes for use by other applications
What do you gain from extending a three-tier architecture to n-tier?
Additional tiers provide more flexibility and scalability
What defines a web service and service-oriented architecture? (3 total)
- Shares business logic, data, and processes through a programmatic interface across a network
- Developers can add web service to a web page, or to an executable program, to offer specific functionality to users
- Use technologies such as: XML, SOAP, WSDL, UDDI
What three factors can describe a distributed database in greater detail? (3 total)
- Software system that permits the management of the distributed DB and makes the distribution transparent to users
- Consists of a single logical DB split into a number of fragments, each stored on one or more computers under the control of separate DBMS, with the computers connected by a network
- Each site capable of independently processing user requests that require access to local data and is also capable of processing data stored on other computers in the network
In cloud computing, what is an on-demand self-service?
Consumers can obtain, configure an deploy cloud services without help from the provider
In cloud computing, what is a broad network access service?
Accessible from anywhere, from any standardised platform
What subclasses of cloud computing SaaS’s exist and how do they differ?
DaaS and DBaaS, differing only in data management
What defines a DBaaS? (3 total)
- Offers full DB functionality to application developers
- Management layer that provides continuous monitoring and configuration of the DB
- Spares developers from the ongoing DB administration tasks
What are the advantages of a DBaaS? (4 total)
o Optimised scaling
o High availability
o Multi-tenancy
o Effective resource allocation in the cloud
What defines a DaaS? (3 total)
- Services enable data definition in the cloud and subsequent querying
- Doesn’t implement typical DBMS interfaces but instead data is accessed via common APIs
- Enables organisation with valuable data to offer access to others
What components make up a DBMS and what are their functions? (14 total)
Query processor
• Transforms queries into a series of low-level instructions directed to the DB manager
DB Manager
• Interfaces with user-submitted application programs and queries
• The DM examines external and conceptual schemas to determine conceptual records to satisfy the request
• DM then paces call to file manager to perform request
File Manager
• Manipulates underlying storage files and manages allocation of storage space on disk
• Establishes and maintains list of structures and indexes defined in the internal schema
DML Pre-processor
• Converts DML statements into standard function calls in host language.
• Must interact with query processor to generate appropriate code
DDL Compiler
• Converts DDL statements into a set of tables containing metadata
• Tables then stored in system catalog while control information is stored in data file headers
Catalog Manager
• Manages access to and maintains the system catalog
Authorisation Control
• Confirms whether the user has the necessary permission to carry out the required operation
Command Processor
• Control passed to this component once user authority is confirmed
Integrity Checker
• Ensures requested operation satisfies all necessary integrity constraints for an operation that changes the DB
Query optimiser
• Determines optimal strategy for query execution
Transaction manager
• Performs required processing of operations received from transactions.
Scheduler
• Ensures concurrent operations on DB proceed without conflicting with one another
• It controls the relative order in which transaction operations are executed
Recovery manager
• Ensures the DB remains in a consistent state in the presence of failures
• It is responsible for transaction commit and abort.
Buffer manager
• Responsible for the transfer of data between main memory and secondary storage, such as disk and tape.
What does a transaction do?
Transforms DB from one consistent state to another, although consistency may be violated during a transaction
What defines a successful transaction?
Transaction is committed to the DB, reaching a new consistent state
What defines a transaction failure?
Transaction aborts, and the DB must be restored to a consistent state before it is started via roll-back
Can a transaction be aborted?
No
Can an aborted transaction be restarted?
Yes, provided it is rolled back
What is concurrency control in the context of transaction management? (2 total)
• Process of managing simultaneous operations on the DB without having them interfere with one another• • Prevents interference when two or more users are accessing DB simultaneously and at least one is updating data
What is the objective of concurrency control?
Objective is to schedule transactions to avoid interference
What limitation does the serial running of transactions bring with it?
Limits degree of concurrency or parallelism in system
What does the lost update problem refer to?
Successfully completed update is overwritten by another user
What does the uncommitted dependency problem refer to?
Occurs when one transaction can see intermediate results of another transaction before it is committed
What does the inconsistent analysis problem refer to?
Occurs when transaction reads several values but second transaction updates some of them during execution of first
What does serialisability do?
Identifies those executions of transactions guaranteed to ensure consistency and aims to find non-serial schedules that allow transactions to execute concurrently without interfering with one another
What is a schedule?
Sequence of reads/writes by set of concurrent transactions
What is a serial schedule?
Schedule where operations of each transaction are executed consecutively without any interleaved operations from other transactions
What is the main issue with a serial schedule?
No guarantee that results of all serial executions of a given set of transactions will be identical
What is a non-serial schedule?
Operations from set of concurrent transactions are interleaved
What defines a serialised schedule?
A schedule is serialisable if it is non-serial in nature and identical to some serial schedule
What are the three rules to consider when identifying potentially conflicting transactions?
- If two transactions only read a data item, they do not conflict and order is not important
- If two transactions either read or write separate data items, they do not conflict and order is none important
- If one transaction writes a data item and the other reads or writes, order of execution is important
What does a conflict serialisable schedule do?
Orders any conflicting operations in same way as some serial execution