Fichas
SCC 201 Lecture 1 - Databases
Fichas del conjunto (40)
- 1How can you determine when you have a relational file?- Number of Records
-Each record has a defined set of attributes - 2What must a programmer do before he accesses a relational file?– Understand format of employeefile, and…
– Either
a) Obtain file access routines from existing program
– Understand what code does
– Include code in new design
b) Write own routines that correctly handle file access - 3Why can we easily calculate the position of each employee's record in the file?because we know each record is of known length.
- 4Why is it more than likely that file access routines will eventually be abstracted out?The more application(s) that are required, the
more times the data will be requested using existing code or new ones created.
Multiple versions
will likely exist in/for each application. - 5What happens if we try to add alter main files of a database to include more information?- The format of the file- as known to other applications- will change
- All existing applications will fail - 6Problems with multiple files and when is this not a problem and what could happen as a result of this?• Two files to maintain
• Performance penalty accessing multiple files
• Old code has no knowledge of new file
– Not a problem for reading/ simple updates
– Danger of data duplication
• Different programmers may independently create their own ‘marital status’ file
– Adding/ deleting records is a problem - 7In a database, what do we need to abstract from the application software?– Data structure
– Data values
– Data access
from the application software - 8What are the two views of data with Database Management System?– Logical view, as presented to applications
– Physical layout on backing store, as manipulated by the DBMS - 9What happens to the two views of data if someone wished to add new information to a data set?If someone wishes to add new information to a data set, this can be added to the physical layout with no ill effects to existing applications (as long as the logical view remains consistent)
- 10What does the logical level makes sure happens when it accesses new information?The logical level has to be able to access the new information without upsetting existing applications
– This can be done by allowing applications to define the subset of the logical view they wish to see - 11What is the subtle point of Data independence?The “subtle” point of Data Independence is that we can organise and re-organise both
… the contents and the structure of the data
– As long as the logical view presented to the application programmer and end-user remains consistent - 12Why is it better to use Databases rather than files?– Data independence
– “Clever” access methods/ physical models that speed up access times even over very large amounts of data - 13How does database systems provide data independence?Database systems provide data independence through data abstraction.
- 14What sort of representation does data abstraction provide? What logical concepts does it use? What does it hide? and what service does it offer to the application software? What type of access mechanisms do data access software use?– is a conceptual representation of the data
– does not include any details of how data is stored
– uses logical concepts such as objects, their properties and inter-relationships
– hides storage and implementation details of no interest to most database users
– offers application software a consistent (logical) interface
• Data Access Software in the DBMS uses the ‘most efficient’ access mechanisms to manipulate the physical data - 15What does Data abstraction present in database systems and what does it offer users if someone wishes to add new information?Data abstraction in database systems presents a logical view of data to applications. The physical layout on the store is manipulated by the DBMS
– If someone wishes to add new information, this can be added to the physical layout with no ill effects to existing applications
(as long as the logical view remains consistent) - 16Where are data definitions, storage structure of data items, and constraints stored?– The data definitions, storage structure of data items, and constraints are stored in the system catalogue
- 17Describe how data abstraction is implemented in traditional file processing and give an example in relation to examination and cashier office? Disadvantages of traditional file processing?In traditional file processing users define and implement the files needed for each specific application
– The examination office application keeps a file on students and their grades
– The cashier’s office application keeps a file on students, their fees and payments
Both offices are interested in data about (the same) students
• Maintain separate files (and programs to manipulate them) as each office requires data not available from the other user’s files
– Wasted storage space
– Redundant effort to keep common data consistent - 18Benefit of DBMS to traditional file processing in relation to concurrency and link it with traditional file processing?A DBMS offers concurrency control mechanisms:
– To ensure that several users trying to update the same data do so in a controlled fashion so that the results of the updates are correct (e.g. several reservation clerks trying to reserve the same seat)
In traditional file processing, support for multiple users accessing the same data needs to be built into the application - 19What are systems that require concurrent transactions called?Systems requiring concurrent transactions are known as on-line transaction processing (OLTP) systems.
- 20What does DBMS restrict and state some of it's multiple user interfaces? What does DBMS enforce and what does it offer in terms of database backup?• Restricting unauthorized access
• Multiple user interfaces
– Query languages
– Application programming interfaces (APIs)
– GUIs
– Natural language interfaces #
– WWW access
• Representing complex relationships among data
• Enforcing integrity constraints
a uniqueness constraint for course codes or student registration numbers
• Backup and recovery - 21What is a entity?Entity
– a specific object, real or abstract, about which we need to store attributes and relationships:
• For example, a person, car, company, etc. - 22What is a attribute?• Attributes
– Properties describing an entity
• For example, a student may be described by name, age, registration number, major, etc. - 23What is a relationship in databases?Relationships
– Associations among entities, for example,
• Person X - is married to - person Y • Person P - works for - company C etc. - 24What is a record and what does it usually describe? what is a record type?• Most common data aggregation mechanism
• A collection of related data values or items
– Usually describes entities and their attributes
– a record type is a collection of field names and their corresponding data
types
– a person record – an instance of person – will be: (“J. Smith”, 42, “AA665544X”) - 25What is a schema?A schema is a “roadmap” for the data eventually stored (sometimes referred to as meta-data: information about data; although this terminology is not so common now).
- 26What does a schema allow you to declare?A database will hold many different kinds of records, some of which will be related in some way. Most DBMSs support the definition of a schema, which allows a user to:
– declare the types of records required (e.g. Person, Company, etc.)
– declare the types of relationships among records (e.g. person works for a company, company employs a person, etc.) - 27Problem with DBMS in relation, to costs?Overhead costs of a DBMS
• High initial investment in
– Hardware, Software, Training
General approach for defining and processing data
• Overhead for providing
– Security, Concurrency control, Recovery and Integrity functions - 28When should you not use DBMS?– The database and applications are simple, well-defined and not expected to change
– There are stringent real-time requirements for some programs that may not be met because of DBMS overheads
– Multiple-user access to data is not required - 29What is a Database and what sort of collection does it provide?• Represents some aspect of real- or mini- world ...also called the Universe of Discourse
– Changes to mini-world are reflected in database
• For example: a university database, an airline reservation database
. Logically coherent collection of data with some inherent meaning
– No need for storing courses taken by a student in an airline reservation system - 30A DBMS is a collection of programs facilitating what:– Definition of a database
• Specifying data types, structures and constraints for the data to be stored in the database
– Construction of a database
• Storing data on storage medium controlled by the DBMS
– Manipulation of a database
• Querying database to retrieve specific data, updating database to reflect changes in the mini-world, and generating reports from the data - 31State some Actors in database system?• Database Administrator
• Database Designers
• Software Engineers - 32Name Actors in a database (End users).• Casual end users
• Naive or parametric end users
• Sophisticated end users
• Stand-alone end users - 33Who are casual end users?– Occasionally access database but may need different information each time
– Use a sophisticated database query language - 34Who are naive or parametric end users?– Make up a sizable potion of database end users
– Use canned transactions – e.g. bank tellers, airline/ hotel reservation systems - 35Who are sophisticated end users?– Implement their own applications – e.g. engineers, scientists, business analysts
- 36Who are stand alone end users?– Maintain personal databases using off-the-shelf systems e.g. Microsoft Money
- 37Who are database administrator?– Authorises access to the database
– Coordinates and monitors its use
– Acquires software and hardware resources as required - 38Who are database designers?– Identify the data to be stored in the database
– Choose appropriate structures and constraints to represent and store this data - 39Who are software engineers?– Identify end user requirements (e.g. standard types of queries and updates
– also called canned transactions)
– Implement, test, debug, document and maintain - 40—
Información
- Descripción
- Fichas sobre SCC 201 Lecture 1 - Databases, creado por Ayo Olutobi el 22/01/2017.
- Creado por
- Ayo Olutobi
- Visitas
- 0
- Valoración