Data Modeling, Queries Flashcards
(30 cards)
What is data modeling?
A technique to document a database management system using diagrams and symbols.
What does ERD stand for?
Entity Relationship Diagram.
What is the primary purpose of an ERD?
To provide a graphical representation of data requirements for a database.
What are the three components of an ERD?
- Entities
- Attributes
- Relationships
Define ‘Entities’ in the context of ERDs.
The basic objects of ERDs, usually represented as tables.
List the five classes of entities.
- Concepts
- Location
- Roles
- Events
- Things
What is an instance of an entity?
A specific example of an entity that becomes a record or row in a table.
What are ‘Attributes’ in an ERD?
Facts or descriptions of entities that become the columns of the table.
What is a primary key?
An attribute or set of attributes that uniquely identifies an instance of an entity.
Can a table have more than one primary key?
No, a table can have only one primary key.
Define ‘Foreign Key’.
A key used to link two tables together, typically the primary key from one table inserted into another.
What are Relationships in an ERD?
Associations between the entities, often described with verbs.
What notation is used to represent relationships in ERDs?
Crow’s Foot notation.
Describe a One to One Relationship (1:1).
A single entity instance in one entity class is related to a single entity instance in another entity class.
Describe a One to Many Relationship (1:M).
A single entity instance in one entity class is related to multiple entity instances in another entity class.
Describe a Many to Many Relationship (M:M).
Each entity instance in one entity class is related to multiple entity instances in another entity class and vice versa.
What is the purpose of queries in health data?
- Efficient data retrieval
- Improved decision making
List types of queries in MS Access.
- Select Query
- Action Query
- Parameter Query
- Crosstab Query
- SQL Query
What is a Select Query?
Retrieves data based on specific conditions.
What is an Action Query?
Updates, deletes, or adds data.
What does SQL stand for?
Structured Query Language.
What is the primary use of SQL?
To communicate with databases.
What is the difference between SQL and MS Access?
- MS Access: User-friendly interface for database management
- SQL: Text-based commands for advanced data retrieval
What is the basic structure of a SELECT statement?
- SELECT [columns]
- FROM [table]