Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Microsoft Access wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Relational model wikipedia , lookup
ContactPoint wikipedia , lookup
Chapter 1 Databases and Database Users 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Introduction An Example Characteristics of the Database Approach Actors on the Scene Workers behind the Scene Advantages of Using a DBMS Implications of the Database Approach When Not to Use a DBMS Summary 1-1 1-1 1.1 Introduction Traditional database applications New applications: multimedia databases, geographic information system, data warehouses, … Database: A collection of related data. Data: Known facts that can be recorded and have an implicit meaning. (e.g., names, telephone numbers, addresses, …) (indexed address book, diskette, …) 1-2 1-2 Mini-world (Universe of Discourse): Some part of the real world about which data is stored in a database. For example, student grades and transcripts at a university. • Library card catalog: generated & maintained manually • Computerized database Database Management System(DBMS): A software package to facilitate the creation and maintenance of a computerized database. ˙Defining ˙Constructing ˙Manipulating Database System: The DBMS software together with the data itself. 1-2 1-3 Figure 1.1 A simplified database system environment 1-3 1-4 1.2 An Example Mini-world for the example: Part of a UNIVERSITY environment. Some mini-world entities: - STUDENTs - COURSEs - SECTIONs (of COURSEs) - (academic) DEPARTMENTs - INSTRUCTORs Some mini-world relationships: - SECTIONs are of specific COURSEs - STUDENTs take SECTIONs - COURSEs have prerequisite COURSEs - INSTRUCTORs teach SECTIONs - COURSEs are offered by DEPARTMENTs - STUDENTs major in DEPARTMENTs 1-4 1-5 1-5 1-6 Define UNIVERSITY database Structure of the record STUDENT ( Name , Number, Class, Major) COURSE ( Name , Number, Credit, Dept.) Data type of data element Name: a string of characters Number: integer Grade: {A,B,C,D,F,I} ….. Constraints The sections that students take must be taught by some instructors. 1-5a 1-7 Construct UNIVERSITY database Store data on storage medium ˙store data for each student, course, section, grade repot, prerequisite ˙records in various files may be related to one another Manipulate UNIVERSITY database Query: Retrieve the transcript ( a list of all courses and grades) of Smith. Update: Create a new section for the database course for this semester. 1-5b 1-8 1.3 Characteristics of the Database Approach • File Processing Each user defines and implements the files needed for a specific application Redundancy in defining & storing data • Database Approach A single repository of data -Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data . This allows the DBMS software to work with different databases. catalog: structure of each file, type & storage format of each data item, constraints on data -Insulation between programs and data: Called program-data independence. Allows changing data storage structures without having to change the DBMS access Interface + method programs.(see 1-7) program– operation independence (OODB) 1-6 1-9 1.3 Characteristics of the Database Approach (Cont.) -Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database. Abstract operation(OODB) -Support of multiple views of the data: Each user may see a different view of the database, which describes only the data of interest to that user. subset or virtual data (see 1-8) -Sharing of Data & Multi-user Transaction processing 1-6 1-10 Storage format for a STUDENT record: Figure 1.3 Add Birth Date to student record Change all programs that access this file. vs. Change the descriptions of student records in the catalog; no programs are changed 1-7 1-11 (see 1-5) Student transcript view: derived from { STUDENT SECTION GRADE-REPORT Course prerequisites view: derived from PREREQUISITE & COURSE Figure 1.4 1-8 1-12 1.4 Actors on the scene: Persons whose job involves daily use of a large database 1.4.1 Database administrators(DBAs): Responsible for managing the database system, authorizing access, coordinating & monitoring uses, acquiring resources. resources ‧database ‧DBMs 1.4.2 Database designers: Responsible for designing the database, identifying the data to be stored, choosing the structures to represent and store this data. 1.4.3 End Users: The persons that use the database for querying, updating, generating reports, etc. ‧Casual end users: Occasional users.(middle- or high-level managers) ‧Parametric (or naive) end users: They use pre-programmed canned transactions to interact continuously with the database. For example, bank tellers or reservation clerk. ‧Sophisticated end users: Use full DBMS capabilities for implementing complex applications. ‧Stand-alone users (personal databases) 1.4.4 System Analysts/Application programmers: Design and implement canned transactions for parametric users. 1-9 1-13 1.5 Workers behind the scene: Persons whose job involves design, development, operation, and maintenance of the DBMS software and system environment. • DBMS designers and implementers: Design and implement the DBMS software package itself. • Tool developers: Design and implement tools that facilitate the use of the DBMS software. Tools include design tools, performance tools, special interfaces,etc. • Operators and maintenance personnel: Work on running and maintaining the hardware and software environment for the database system. 1-10 1-14 1.6 Advantages of Using a DBMs 1.6.1 Controlling Redundancy in data storage and in development and maintenance efforts. ‧duplication efforts ‧waste space ‧inconsistent ( see 1-12 controlled redundancy) 1.6.2 Restricting Unauthorized Access (security and authorization) 1.6.3 Providing Persistent Storage for Program Objects and Data Structures. 1.6.4 Permitting Inferencing and Actions Using Rules 1.6.5 Providing Multiple User Interfaces 1.6.6 Representing Complex Relationships Among data. 1.6.7 Enforcing Integrity Constraints 1.6.8 Providing Backup and Recovery 1-11 1-15 1.7 Implications of the Database Approach -Potential for Enforcing Standards. -Reduced Application Development Time. -Flexibility. -Availability of Up-to-date Information. -Economies of Scale. 1-11 1-16 Controlled redundancy (refer to 1-5) redundancy VS efficiency (Name-student Number) also appears in STUDENT RECORD Figure 1.5 Smith 1-12 1-17 1.8 When not to use a DBMS Main costs of using a DBMS: - High initial investment in hardware, software,training and possible need for additional hardware. - Overhead for providing generality, security, recovery, integrity, and concurrency control. - Generality that a DBMS provides for defining and processing data. When a DBMS may be unnecessary: - If the database and applications are simple, well defined, and not expected to change. - If there are stringent real-time requirements that may not be met because of DBMS overhead. - If access to data by multiple users is not required. 1-13 1-18