Download presentation
Presentation is loading. Please wait.
Published byRosa King Modified over 6 years ago
1
CPSC 603 Database Systems Lecturer: Laurie Webster II, Ph.D., P.E.
Introduction to a First Course in Database Systems
2
CPSC 603 Database Systems What is a Database Management System?
Manages very large amounts of data Supports efficient access to very large amounts of data Supports concurrent access to v.l.a.d Supports secure, atomic access to v.l.a.d
3
Relational Database Systems
CPSC 603 Database Systems Relational Database Systems Ted Codd in 1970 wrote a famous paper “A Relational Model for large shared data banks” => database systems changed significantly!!
4
CPSC 603 Database Systems Database Systems presented Users with a View of data organized as tables called Relations In this course we will concentrate primarily on Relational Models of Database Systems
5
Relational Model (Table)
CPSC 603 Database Systems Relational Model (Table) acct# name balance 12345 Sally 34567 Sue …… …… …...
6
Relational Model (Table)
CPSC 603 Database Systems Relational Model (Table) * Today Relational Models are used in most DBMS’s * The columns of relations (tables) are headed by attributes (acct#, name, balance, type,….)
7
Relational Model (Table)
CPSC 603 Database Systems Relational Model (Table) Rows of the relations(tables) are also called tuples Tuples are a mathematical term
8
Relational Model (Table) Columns Tuples Rows
CPSC 603 Database Systems Relational Model (Table) Columns Tuples Rows
9
SQL => Structured Query Language
CPSC 603 Database Systems SQL => Structured Query Language SELECT A1, A2, ………., An FROM r1, r2, ………….., rm WHERE p Relational Algebra A1, A2, ……., An ( p (r1, r2, ………….., rm ) ) p predicate , Ai attributes , ri relations
10
CPSC 603 Database Systems attributes account balance type
savings rows (tuples) checking …… ………. ………. …… => many more tuples, one for each account at this bank!!! CPSC 603 Database Systems
11
CPSC 603 Database Systems attributes Accounts accountNo balance type
savings rows (tuples) checking …… ………. ………. SELECT balance FROM Accounts WHERE accountNo = 67890; QUERY: What is the balance of account number 67890 ? CPSC 603 Database Systems
12
CPSC 603 Database Systems SQL QUERY => SELECT account FROM Accounts
WHERE type = ‘savings’ AND balance < 0; QUERY: What are the saving accounts with negative balances?
13
CPSC 603 Database Systems SQL QUERY => SELECT account FROM Accounts
WHERE type = ‘savings’ AND balance < 0; 1. Examine all tuples of the relation Accounts mentioned in the FROM - clause 2. Pick out those tuples that satisfy some criterion indicated in the WHERE clause, and 3. Produce as an answer certain attributes of those tuples, as indicated in the SELECT - clause.
14
CPSC 603 Database Systems Major Components of a DBMS: Query Processor
Storage Manager Data + Metadata Transaction Manager Metadata = information about the structure of the data If the DBMS is relational then the metadata includes the names of relations, names of attributes, data types for these attributes (e.g., integer or character string of length 20)
15
Schema Modifications Queries Modifications Query Processor Transactions Manager Storage Manager Data Metadata
16
CPSC 603 Database Systems DATA MODELS
* Underlying structure of a database is the data model structure => data types, relationships, constraints that should hold for the data
17
Data Models Object-based logical models Record-based logical models
Physical models
18
Object-Based Logical Model
Entity-Relationship model (ER Models) The Object-Oriented model The Semantic Data Model The Functional Data Model
19
E-R Data Models E-R Model is based on a perception of a real world that consists of a collection of basic objects called entities and of relationships among these objects Entity is a “thing” or “object” in the real world that is distinguishable from other objects i.e. a person is an entity Relationship is an association among several objects
20
Object-Oriented Model
Object-Oriented Models are based on a collection of objects
21
Record-Based Logical Model
Relational Model (primary focus of this class) Network Models Hierarchical Model
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.