Chapter 5: Organizing and Storing Data Flashcards
What is relational database?
A series of related tables that are stored together with minimum duplication
What is the most commonly used database?
Relational
What is the RS DB made up of?
Made up of tables
What are tables?
It is made up of records
What is each record made up of?
A number of fields
What do we call a table that stores data about someone or something of interest to each firm?
An Entity
Give me an example of an entity
Customer
What are Fields?
Specific items of data stored about an entity
What are Records?
Collects all the data about one specific entity
Give me an example of data stored in Fields
Name, date of birth, address
Give me an example of data stored in a Record
A customer called John Smith
What are Primary keys?
a field that defines to be unique for each entity
What are some examples of Primary Keys?
Student ID, Exam ID, and Library ID (Those that uniquely identify you)
What are Primary keys used for?
To join tables
What is a foreign key?
a Primary key that is posted into another table to create a relationship between the two tables
What are the advantages of Database Approach?
- Improved Strategic use of corporate data
- Reduced Data Redundancy
- Improved Data Integrity
- Improved Data Protection
What are the disadvantages of Database Approach?
- Making it more complex and difficult (DBMS is quite difficult to set up and operate)
- Difficulty recovering from failure (failure can shutdown the entire database)
- It is Expensive (DBMS is expensive to purchase and operate)
What is Database Design? (or Data Model, Database Schema)
A list of all the tables in the Database, and fields with any primary and foreign keys identified.
What are the 4 stages a database goes through?
- Identify all entities
- Identify all relationships between entities
- Identify all attributes
- Resolve all relationships
What are the 3 main concepts in a Relational Database design?
- Degree
- Cardinality
- Optionality
Explain what a Degree is
a number of entities involved in a relationship
What is Cardinality?
determines whether each entity in the RS is related to one or more of the other entities
Explain Optionality
If a binary RS is optional for an entity, that entity doesn’t have to be related to the other
Tell me the three basic Cardinality types
- One to one
- One to many
- Many to Many
Explain to me how one-to-one works
Here’s an example: Person <-> Passport / Each person must have only one passport only.
Now, to resolve this relationship, we must combine both entities into one table.
Explain how one-to-many works
Here’s an example: Customer = Order (The customer is one while the order can be infinite) Basically, (one) customer can place many orders (multiple orders but the a single order must be placed by one customer not many)