ch1 Flashcards

1
Q

Define: data

A

known facts that can be recorded and that have implicit meaning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define: database

A

a collection of related data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define: DBMS

A

DataBase Management System; a computerized system that enables users to create and maintain a database; a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing databases among various users and applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define: database system

A

the database and the DBMS software together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define: database catalog

A

the part of a DB system that contains a complete definition or description of the DB structure and constraints (meta-data);
contains info such as:
* structure of each file
* type and storage format of each data item
* various constraints on the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define: program-data independence

A

a property that describes how the structure of data files can be stored in the DBMS catalog separately from the access programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define: user view

A

a perspective or view of the DB tailored to meet the requirements of a specific user; a view may be a subset of the DB or it may contain virtual data that is derived from the DB files but is not explicitly stored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define: DBA

A

DataBase Administrator; an ‘actor on the scene’ who is responsible for authorizing access to the DB, coordinating and monitoring its use, and acquiring software and hardware resources as needed; accountable for problems such as security breaches and poor system response time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define: end user

A

the people whose jobs require access to the DB for querying, updating, and generating reports; the DB primarily exists for their use;
categories:
* casual end users: occasionally access DB, may need diff info each time, typically mid/high-level managers or occasional browsers
* naive/parametric users: main job function revolves around constantly querying/updating the DB using canned transactions; ex: bank customers/tellers, airline/hotel/rental car reservation agents/customers, employees at receiving stations for shipping companies, social media users
* sophisticated end users: engineers, scientists, business analysts, etc who thoroughly familiarize themselves with the facilities of DBMS in order to implement their own apps to meet their complex requirements
* standalone users: maintain personal DBs by using ready-made program pkgs that provide easy-to-use menu-based interfaces/GUIs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define: canned transaction

A

a standard type of query or update used by naive or parametric end users; has been carefully programmed and tested; now often available as mobile app on mobile devices;
ex:
* check bank account balance, post withdraws/deposits
* check availability for airline/hotel/car rental request, make reservation
* update central DB of received/in-transit packages at shipping company receiving station
* post and read items on social media website

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define: deductive database system

A

a DB system that provides capabilities for defining deduction rules for inferencing new info from the stored DB facts (ex: triggers, sprocs, …active DB systems?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define: persistent object

A

a complex object (from an OO programming language [i.e. C++, Java]) that is stored permanently in an OO DBMS; survives the termination of program execution and can later be directly retrieved by another program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define: meta-data

A

the info stored in a DB catalog; describes the structure of the primary DB; a complete definition or description of the DB structure and constraints (meta-data);
contains info such as:
* structure of each file
* type and storage format of each data item
* various constraints on the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define: transaction-processing application

A

an application that accesses the DB by sending queries or requests for data to the DBMS; (transaction: an executing program or process that includes one or more DB accesses such as reading or updating DB records); (DBMS must ensure that concurrent transactions operate correctly and efficiently; DBMS must enforce isolation and atomicity)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What four main types of actions involve databases?

A

???

  1. Defining a DB: specifying data types, structures, and constraints of the data to be stored
  2. Constructing the DB: process of storing the data on some storage medium that is controlled by the DBMS
  3. Manipulating a DB: includes functions such as querying the DB to retrieve specific data, updating the DB to reflect changes in the miniworld, generating reports from the data
  4. Sharing a DB: allows multiple users and programs to access the DB simultaneously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Discuss the main characteristics of the database approach and how it differs from traditional file systems.

A

main characteristics of DB approach:

  • self-describing nature of a DB system; can access diverse DBs by extracting and using DB definitions from the catalog
    • vs file processing: data definition is part of the app programs themselves, programs are constrained to work with only one specific DB
  • insulation between programs and data, and data abstraction; structure of data files is stored in DBMS catalog separately from access programs; program-data independence; program-operation independence
    • vs file processing: structure of data files is embedded in app programs, so any changes to structure of file can require changing all programs that access that file
  • support of multiple views of the data
    • vs file processing: ???
  • sharing of data and multiuser transaction processing; requires DBMS concurrency control software to ensure that several users trying to update the same data do so in a controlled manner so that the result of the updates is correct; DBMS must ensure isolation and atomicity
    • vs file processing: ???
17
Q

What are the responsibilities of the DBA and the database designers?

A

DBA: DataBase Administrator; an ‘actor on the scene’ who is responsible for authorizing access to the DB, coordinating and monitoring its use, and acquiring software and hardware resources as needed; accountable for problems such as security breaches and poor system response time

Database Designers: ‘actors on the scene’ responsible for identifying the data to be stored in the DB and choosing appropriate structures to represent and store this data; communicate with all prospective DB users in order to understand their requirements and to create a design that meets these requirements; typically interact with each potential group of users and develop views of the DB that meet the data and processing requirements of these groups

both: choosing which indexes to create and maintain for query processing and optimization (part of physical DB design and tuning)

18
Q

Explain the roles of a system analyst and an application programmer in a database system.

A

System analyst: determine requirements of end users, especially naive/parametric end users; develop specs for standard canned transactions that meet these requirements

Application programmer: implement specs from system analyst as programs; test, debug, document, maintain these canned transactions

system analysts, app programmers: aka software developers, software engineers; should be familiar with full range of capabilities provided by DBMS to accomplish their tasks

19
Q

Discuss the advantages of using the DBMS approach.

A
  • controlling redundancy
  • restricting unauthorized access
  • providing persistent storage for program objects
  • providing storage structures and search techniques for efficient query processing
  • providing backup and recovery
  • providing multiple user interfaces
  • representing complex relationships among data
  • enforcing integrity constraints
  • permitting inferencing and actions using rules and triggers
  • additional implications of using the DB approach (can benefit most organizations):
    • potential for enforcing standards
    • reduced app development time (“Development time using a DBMS is estimated to be one-sixth to one-fourth of that for a file system.”)
    • flexibility
    • availability of up-to-date information
    • economies of scale
20
Q

Under what circumstances is it desirable to develop customized database applications?

A
  • simple, well-defined DB apps that are not expected to change at all
  • stringent, real-time requirements for some app programs that may not be met because of DBMS overhead
  • embedded systems with limited storage capacity, where a general-purpose DBMS would not fit
  • no multiple-user access to data
21
Q

Identify some informal queries and update operations that you would expect to apply to the database shown in Figure 1.2.

A
  • SELECT all students with a given major/year
  • SELECT all courses in a given department
  • SELECT all students in a given course
  • SELECT all courses taught in a given semester in a given year
  • SELECT all students with grade in (C, F) (academic probation)
  • SELECT all the prerequisites for a given course number/all the courses for which a given course number is a prerequisite
  • UPDATE class for all students after end of year
  • UPDATE coursenumber when Department name changes
  • UPDATE section IDs for given course number
  • UPDATE grade for a student after they retake an exam
  • UPDATE prerequisite course number when coursenumber changes
  • INSERT new students, new courses, new sections, new grade reports for students in sections, new prerequisites when new course added or new prerequisite decided to count
22
Q

Discuss the various storage structures and search techniques used for efficient query processing.

A
  • indexes: usually tree or hash data structures designed to speed up disk search
  • caching/buffering module: controls copying DB records from disk to main memory buffers for processing
  • query processing and optimization module: chooses an efficient query execution plan for each query based on the existing storage structures
23
Q

Specify all the relationships among the records of the database shown in Figure 1.2.

A
  • student enrolled in a section (of a course)
  • section group of a course
  • student has a grade in a section (of a course)
  • course can be a prerequisite of another course
  • courses belong to a department
  • student has a major with one of the departments
  • student can enroll in a section of a course if they have already taken the prerequiste course(s)
  • student can enroll in a section of a course if the section is offered during the current semester and year
24
Q

Give some additional views that may be needed by other user groups for the database shown in Figure 1.2.

A
  • SELECT current courses that a given student is taking
  • SELECT all courses+sections offered during given semester/year
  • SELECT all prerequisite courses for a given course
  • SELECT all grades for all students in a given section of a course
  • SELECT all grades for a given student
  • SELECT all courses(+sections) from a given department
  • SELECT all students with a given grade (A for honor roll, F for AP)
25
Q

Cite some examples of integrity constraints that you think can apply to the database shown in Figure 1.3.

A
  • simple integrity constraints: data types for each data item
  • key/uniqueness constraints: Student_number, Course_number
  • referential integrity constraints: Prerequiste_number must also be a Course_number
26
Q

How is the abstraction process in the database approach different from the object-oriented and object-relational databases?

A

DB approach: the detailed structure and organization of each file are stored in the catalog; DB users and app programs refer to the conceptual representation of the files and the DBMS extracts the details of file storage from the catalog when needed by the DBMS file access modules; many data models can be used to provide this data abstraction to DB users

in OO and OR DBs: the abstraction process includes not only the data structure, but also the operations on the data; ops provide an abstraction of miniworld activities commonly understood by the users; ops can be invoked by user queries or app programs without having to know the details of how the ops are implemented

27
Q

Consider Figure 1.2.
If the name of the ‘CS’ (Computer Science) Department changes to ‘CSSE’ (Computer Science and Software Engineering) Department and the corresponding prefix for the course number also changes, identify the columns in the database that would need to be updated.

A
  • STUDENT.Major
  • COURSE.Course_number, COURSE.Department
  • SECTION.Course_number
  • PREREQUISITE.Course_number, PREREQUISITE.Prerequisite_number
28
Q

Consider Figure 1.2.
Can you restructure the columns in the COURSE, SECTION, and PREREQUISITE tables so that only one column will need to be updated?

A

BEFORE:

  • STUDENT: Name, Student_number, Class, Major
  • GRADE_REPORT: Student_number, Section_identifier, Grade
  • COURSE: Course_name, Course_number (XXXXNNNN), Credit_hours, Department
  • SECTION: Section_identifier, Course_number, Semester, Year, Instructor
  • PREREQUISITE: Course_number, Prerequisite_number

???can i use triggers and foreign key constraints???
AFTER:
* STUDENT: (no change)
* GRADE_REPORT: (no change)
* COURSE: Department (TRIGGER on update: update Course_number), Course_name, Credit_hours, Course_number (TRIGGER on update: update SECTION.Course_number, PREREQUISITE.Course_number, PREREQUISITE.Prerequisite_number)
* SECTION: (no change)
* PREREQUISITE: (no change)

29
Q

Normalization

A

when each data item is stored in exactly one place in the DB (ideal)

30
Q

Denormalization

A

requires controlled redundancy from DBMS; when some data is stored in multiple places in the DB to improve performance (bc you dont have to search multiple files)

31
Q

sources of DBMS overhead costs

A
  • high initial investment in hardware, software, and training
  • the generality that a DBMS provides for defining and processing data
  • overhead for providing security, concurrency control, recovery, and integrity functions