Download presentation
Presentation is loading. Please wait.
1
6/29/20151 Introduction to Database Systems zPurpose of Database Systems zViews of Data zData Models zData Definition Language zData Manipulation Language zTransaction Management zStorage Management zDatabase Administrator zDatabase Users zOverall System Structure
2
6/29/20152 Database Management System (DBMS) zCollection of interrelated data zSet of programs to access the data zDBMS contains information about a particular enterprise zDBMS provides an environment that is both convenient and efficient to use.
3
6/29/20153 Purpose of Database Systems zDifficulties in conventional file-processing systems: (DBMS attempts to solve) yData redundancy and inconsistency yDifficulty in accessing data yData isolation -- multiple files and formats yIntegrity problems yAtomicity of updates yConcurrent access by multiple users ySecurity problems
4
6/29/20154 View of Data …... View level View 1View 2View n Logical level Physical level
5
6/29/20155 Levels of Abstraction zPhysical level: describes how a record (eg.: customer) is stored in terms of block#, sector#, byte# etc. zLogical level: describes data stored in database, and the relationship among the data: customer { string name; string street; integer city; } zView level: Application programs/GUI etc hide the actual representation and present only the required data in a convenient way. Eg: Visual forms, graphical forms.
6
6/29/20156 Instances and Schemas zSchema is a description and an instance is a set of data that fits the description. zSchema : logical structure of the database (eg. Set of customers and accounts and the relationship between them) zInstance : actual content of the database at a particular point in time. zOne schema may have many instances. zAnalogy : type and variable in a programming language.
7
6/29/20157 Data Independence zAbility to modify a schema definition in one level without affecting a scheme definition in the next higher level. zInterfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others: zTwo levels of data independence: yPhysical data independence yLogical data independence
8
6/29/20158 Data Models zA collection of representations for describing: ydata, data relationships, data semantics, data constraints zObject-based logical models yEntity-Relationship (ER) model yObject-oriented model ySemantic model yFunctional model zRecord-based logical models yRelational model (e.g. SQL/DS, DB2) yNetwork model yHierarchical Model yObject relational model
9
6/29/20159 Entity-Relationship Model customer name SSN street city account number balance depositor entity attribute relationship
10
6/29/201510 Relational Model NameSSNstreetcityaccount no. Johnson 192-83-7465Alma Palo AltoA-101 Customer Table Account No.Balance Account Table A-101 500
11
6/29/201511 Data Definition Language (DDL) zSpecification notation for defining database scheme zDDL compiler generates a set of tables in a data dictionary zData dictionary contains metadata (data about data) zData storage and definition language - special type of DDL in which storage and access methods used by the dbms are specified. zSQL create, define tables
12
6/29/201512 Data Manipulation Language zLanguage for accessing and manipulating the data organized by appropriate data model zTwo classes of languages: yProcedural - user specifies what data is required and how to get those data yNon-procedural -- user specifies what data is required without specifying how to get those data zQuery language (sequential query language: sql) : insert data, update data
13
Relational Algebra zTables representing relations zRow uniquely identified by a primary key zRelated tables are associated using foreign keys zSpecial operators are defined and axioms: join, project etc.: relational algebra zhttp://db.grussell.org/section010.html 6/29/201513
14
6/29/201514 Transaction Management zA transaction is a collection of operations that perform a single logical function in a database application zExample: Withdraw $100 from Acct Number A-101 yVerify the balance yUpdate account table (& other tables) yDeliver money
15
6/29/201515 Transaction Management (contd.) zTransaction-management component ensures that the db remains in a correct state despite system failures (e.g. power failures and operating system crashes) and transaction failures. zACID property: Atomicity, Consistency, Isolation, Durability zConcurrency-control manager controls the interaction among the concurrent transactions.
16
6/29/201516 Storage Management zA storage manager provides the interface between the low-level data and the application programs and queries submitted to the system. zThe storage manager is responsible for the following tasks: yinteraction with file-manager yefficient storing, retrieving, and updating of data
17
6/29/201517 Overall System Structure Naïve usersApplication programmers Sophisticated users DBA Application interfaces Application programs query Database scheme Query processing DBMS System Object code Embedded DML compiler DML compiler DDL interpreter Query evaluation engine Storage manager Transaction manager Buffer manager File manager Data dictionary Statistical data indices Data files Disk storage
18
6/29/201518 Database Administrator zCoordinates all the activities of the database system; zDBA should have a good understanding of the enterprise’s information resources and needs. zDBA’s duties include: yScheme definition yStorage structure and access method definition yGranting user authority to access the database ySpecifying integrity constraints yActing as liaison with users yMonitoring performance and responding to changes in requirements
19
6/29/201519 Database Users zDifferentiated by the how they interact with the system zNaïve users: invoke pre-determined application with high-level user interface zApplication programmers; Use DML calls, embedded calls zSophisticated users: managers, decision support systems: request using query languages zSpecialized users: design and write specialized applications.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.