TOPIC 2 - Databases Flashcards
what are the 2 ways to store data digitally?
flat files (one large table) relational database (many smaller tables)
benefits of a flat file
simple to create
easy to understand
all data in one place
good for one person with small amount of data
key question of flat files
how are the needs of storing data for one person diff from needs of storing data for a large company
goal of flat files
accurate, timely, relevant information
limitations of flat files
lack of security lack of multiple access lack of data integrity lack of scalability program data dependance lack of custom formats (view)
what is a database?
a collection of related information stored in a structured form
what does schema describe
structure of a database
what is a database management system
a collection of programs that manipulate a database: updates, queries, etc
why use databases and dbms?
Data integrity -> reduce redundancy and inconsistency
Data independence from the program
Security
Enable data sharing and high availability
Provide centralized data administration
Reduce application development time because standard software packages exist in the market for these tasks
name the 4 common types of databases
hierarchy, network, relational, object oriented
explain a hierarchy model
model data as a tree
Captures relationship among the data (parent can have many children)
explain a network model
model data as a network
A child can have multiple parents
Faster than relational
Not as common
explain object oriented model
model data as objects
Stores both the type of data and procedures that manipulate the data
Becoming more popular
explain inheritance vs polymorphism
Inheritance is when an instance of a sub-class receives the same properties of its super-class
Polymorphism is when a sub-class implements a method which can override the one defined in the super-class
explain relational model
modelled as a table and information is related
what is an attribute/field
single value of a column (headers)
what is a domain?
set of allowed values for an attribute