250 likes | 362 Views
Databases: Concepts and Architecture. Hossein Rahmani. Data models. Set of concepts used to describe the structure of a database Can contain: Basic operations (update, delete) Dynamical aspects, behaviour (user defined operations). Data models. Conceptual (high-level)
E N D
Databases: Concepts and Architecture Hossein Rahmani
Data models • Set of concepts used to describe the structure of a database • Can contain: • Basic operations (update, delete) • Dynamical aspects, behaviour (user defined operations) Databases lecture 1b
Data models • Conceptual (high-level) • for end users / analists versus • Physical (low-level) • for programmers • In between: Representational (implementation) data model Databases lecture 1b
Conceptual data model • Built around: • Entities • Real-world object • Attributes • Relations • Entity-relation schema (next session) • Alternatives: Extended ER / UML Databases lecture 1b
Representational data model • Relational data model • Network model • Hierarchical model • Object model • … Databases lecture 1b
Physical data model • Describe how data stores as files • Record formats • Record orderings • Access path Databases lecture 1b
Schema (intension) • The description of a database is called a database schema • A represented database-schema (on paper or screen) is a schema diagram • Each element of a schema is called a schema construct • These are stored in a catalogue Databases lecture 1b
Database schema diagram Databases lecture 1b
Database state (extension) • A database schema is (relatively) fixed, but the content of a database varies: • Database state or snapshot • Collection of current instances Databases lecture 1b
Database state Databases lecture 1b
DBMS architecture • Three-schema-architecture or three-layer-architecture: • Internal layer: internal schema (physical) • Conceptual layer: conceptual schema (ER) • External layer: user views • Predefined mappings between the layers Databases lecture 1b
Data independence • Logical data independence • Change conceptual schema without changing external views • Physical data independence • Change physical layer without changing conceptual schema Databases lecture 1b
Database languages • Data-definition language (DDL) • Specify conceptual schema • Storage-definition language (SDL) • Specify internal schema • View-definition language (VDL) • Specify user views • Data-manipulation language (DML) • Create, Retrieve, Update and Delete operations Databases lecture 1b
Database interfaces • Menu-based (browsing) • Form-based (form spec language) • GUI • Natural language interface • “Free Form” textual query • Specialized interfaces for parametric users • Small frequent operations • Interfaces for the administrator • Privileged commands by DBA, Security commands etc Databases lecture 1b
DBMS Component Modules • High Level • Various users with their interfaces • DBMS responsible for data storage and data processing Databases lecture 1b
Database system utilities • Loading data • Loading existing data files • Transferring data from another DBMS • Data conversion is needed • Backup • Reorganisation • Improve performance • Performance monitoring • Provide statics to DBA • Other (sorting files, data compression, user-access monitoring, network interfacing, …) Databases lecture 1b
Other tools • CASE tools (for designing databases) • Data dictionary system • Store design decisions, usage standards, etc • Used mainly by users and not by DBMS software • (Rapid) Application development environment • Powerbuilder (Sybase) / JBuilder (Borland) / Visual Basic • Communication software (DB/DC) • Allow users to remotely access data Databases lecture 1b
DBMS Classification • Criteria • Data model (relational, network, object) • Number of users (1, more, many) • Number of places (centralized, distributed) • Costs (open source, commercial) • General / specialized • etc Databases lecture 1b
Centralized architecture • Centralized architecture • DBMS runs on a central computer (mainframe) to which (dumb) terminals are connected • Introduction of LAN and PC’s • Terminals became smart PC’s and were able to take over certain tasks of the DBMS Databases lecture 1b
File sharing • Several PC’s access files that are stored on a central file server • Query-processing and updates are done by the PC’s • Concurrency (e.g. deadlocks) has to be guarded by the PC’s Databases lecture 1b
Client / Server architecture • Distribution between client machines and server machines • Client-machines located at users • Light-weight machines (PC’s) • User-interface • Server-machines centrally • Heavy machines • No end users • Two main Types DBMS Architecture • Two tier, Three tier Databases lecture 1b
Two-tier architecture • Server machine runs DBMS (Oracle, SQLserver, MySQL) • Contains all data and meta-data • Runs queries and updates • Client machine runs application software and communicates with Server • Via ODBC, JDBC, .NET, SQLnet, etc. Databases lecture 1b
Three-tier architecture • Database Servers running DBMS • Clients run Web-browser (thin client) • In between are Application Servers that run the database applications (process management, business logic) Databases lecture 1b