Data bases Flashcards
Data models
Organizes data elements and standardizes how data elements relate to one
another
four different models and their definition
flat file model:
store information
in the most basic format
Hierarchical Model:
Let’s you define simple parent-child
relations and restricts access to make edits.
Network Model:
complex relations, allows for multiple access points and limited access to make edits
Relational Model:
relations between entities
with relations between integers,
strings, and other attributes.
Traditional File Processing System
simple system in which the data is contained in independent tables
File Processing Systems -
Characteristics
- Separate data files are created and stored
- Data is duplicated in separate files for separate applications
File Processing Systems -
Problems
- poor security
-limited data sharing
-data redundancy
-data inconsistency
Database Approach -
Characteristics
a centralized collection of data organized in an efficient way that allows you to use it in many different applications. It’s stored in one location in one single database meaning you don’t have to make duplicate copies.
Advantages of the Database
Approach
-improved security
-improved flexibility
-minimal data inconsistency and redundancy
which of the different model fall under the database approach
hierarchical model
relational model
network model
The relational database model…how does it work?
It’s a two dimensional table, in which which record has a unique identifier that link tables to one another
primary key
Every table/entity has a primary key that uniquely identifies it. The number of attributes needed to uniquely identify a record is the maximum and minimum amount that it needs.
Foreign Key
is the way in which the tables are being tied together, the primary key becomes a foreign key in the other table.
True or False: All values of foreign keys must exist as values in
the parent table
True
Entity Relationship Diagrams (ERD)
is a data model that
graphically depicts relationships between entities
ERD - Elements
Entity: A person, place, object, event (example: student)
attribute: characteristics of the entity (example: student ID, student first name)
relationship: association with other entities (line between student and phone number)
cardinality: the count of instances that are allowed (on-to-one, one-to-many, many-to-many)
Assigning Foreign Keys- ERD model
One to One Relationship:
take a primary key from any of the entities and put it as a foreign key in the other entity.
One to many relationship:
take the primary key in the one side and put it as a foreign key on the many side
many to many relationship: create an associative entity