Download presentation
Presentation is loading. Please wait.
1
CPSC-608 Database Systems
Fall 2018 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 2
2
Undergraduate Database
A Quick Review on Undergraduate Database
3
Database is just another model of information processing
(in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL
4
Database is just another model of information processing
(in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL
5
How Should Data be Stored?
Large volume: cannot fit in memory, thus in general stored in disks;
6
How Should Data be Stored?
Large volume: cannot fit in memory, thus in general stored in disks; Regular files are not organized enough;
7
How Should Data be Stored?
Large volume: cannot fit in memory, thus in general stored in disks; Regular files are not organized enough; Hierarchical structure and network structure were considered, but became less popular;
8
How Should Data be Stored?
Large volume: cannot fit in memory, thus in general stored in disks; Regular files are not organized enough; Hierarchical structure and network structure were considered, but became less popular; Table structures (2-dimensional arrays) are currently the most popular model (relational model);
9
How is Information Represented?
How can everything be given by tables?
10
How is Information Represented?
How can everything be given by tables? Well, information consists of objects/items and relationships among items;
11
How is Information Represented?
How can everything be given by tables? Well, information consists of objects/items and relationships among items; An item has certain properties, which can be listed in a row. Thus, a collection of similar items can be given as a table, one row for an item;
12
How is Information Represented?
How can everything be given by tables? Well, information consists of objects/items and relationships among items; An item has certain properties, which can be listed in a row. Thus, a collection of similar items can be given as a table, one row for an item; A relationship can be given by listing each item group that satisfies the relationship;
13
How is Information Represented?
How can everything be given by tables? Well, information consists of objects/items and relationships among items; An item has certain properties, which can be listed in a row. Thus, a collection of similar items can be given as a table, one row for an item; A relationship can be given by listing each item group that satisfies the relationship; High-level representation of information (E-R Diagram: read Chapter 4)
14
Table structures (terminologies)
Information is stored in tables (≡ relations); Each column of a table is an attribute, with an attribute name;
15
Table structures (terminologies)
Information is stored in tables (≡ relations); Each column of a table is an attribute, with an attribute name; A database is a collection of relations;
16
Table structures (terminologies)
Information is stored in tables (≡ relations); Each column of a table is an attribute, with an attribute name; A database is a collection of relations; An example table (Account): Account No. Balance Type 12345 20,520 checking 23456 1,000,000 CD 34567 26 savings 45678 7,023
17
Table structures (terminologies)
A relation schema gives the name of the relation and its attributes;
18
Table structures (terminologies)
A relation schema gives the name of the relation and its attributes; A database schema gives the schemas for all relations in the database;
19
Table structures (terminologies)
A relation schema gives the name of the relation and its attributes; A database schema gives the schemas for all relations in the database; Schemas affects how the data is stored;
20
Table structures (terminologies)
A relation schema gives the name of the relation and its attributes; A database schema gives the schemas for all relations in the database; Schemas affects how the data is stored; Database schemas are given and altered using data definition language (DDL);
21
Table structures (terminologies)
A relation schema gives the name of the relation and its attributes; A database schema gives the schemas for all relations in the database; Schemas affects how the data is stored; Database schemas are given and altered using data definition language (DDL); Only database administrator can use DDL.
22
What is a good DB schema?
23
What is a good DB schema? What is a good table structure? Fat or thin?
24
What is a good DB schema? What is a good table structure? Fat or thin?
More important: how can tables guarantee information consistency?
25
What is a good DB schema? What is a good table structure? Fat or thin?
More important: how can tables guarantee information consistency? There is a beautiful theory (functional dependency) for constructing a good database schema;
26
What is a good DB schema? What is a good table structure? Fat or thin?
More important: how can tables guarantee information consistency? There is a beautiful theory (functional dependency) for constructing a good database schema; Read Chapter 3.
27
Database is just another model of information processing
(in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.