๐
Fundamental database concepts
On this page
What is a database?
A collection of data organized in such a way that a computer can efficiency store and retrieve data.
Why use a database?
Leverage and process data more efficiently.
- a transaction is an atomic unit of interaction between user and database
What is a relational database?
A collection of relations, often just called tables.
A relation schema is the set of attribute names and the domain(data type) for each attribute name
pros: lack of redundancy,fast access
a balance between space (lack of redundancy) and speed (fast access to data)
many relations leads to lower redundancy, but more joins(slow speed)
fewer relations leads to fewer joins (slow speed) but greater redundancy (and integrity problems)
base on hierarchical model
- efficient storage, but limited expressiveness
- the network model was used to overcome lack of expressiveness in hierarchical databases-> highly complex database system
- the deductive model is an active research-> store rules
relational operators
- project
- restrict
- join
Why does spatial data present problems for relational databases?
What is object-orientation, and how is it relevant to databases?
This is especially useful for spatial data
DB Development
- a conceptual data model is independent of implementation details
- provide a means for communication
- aid the design of the system
- provide basic reference material for implemented system
- Entity relationship model
- many-to-many
- many-to-one
- one-to-one
- convert each entity into a relation
- convert each relationship into a relation
Object-orientation
- aim to minimize information lost
- attributes
- operations
- classes
- 4 features
- reduces complexity->simple
- combats information lost
- promotes reuse->more efficient
- metaphorical power->close to physical objects
- encapsulation: hide internal mechanisms of their behavior from the external access to that behavior