Curriculum Flashcards
What is a Relational Database?
A relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables.
What is an Entity Relationship(ER) diagram?
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects or concepts relate to each other within a system.
What is an ENTITY in an entity relationship diagram and how is an ENTITY shown in an ER diagram?
A definable thing—such as a person, object, concept or event—that can have data stored about it. Think of entities as nouns. Examples: a customer, student, car or product. Think of the entity name as the table name.
Will typically be shown as a rectangle.
What is an ATTRIBUTE in an entity relationship diagram and how is the ATTRIBUTE displayed in the ER diagram?
An ATTRIBUTE is the property or characteristic of an ENTITY. Think of the attributes at the column names of a table.
An ATTRIBUTE is often shown as an oval or circle.
What is a RELATIONSHIP in an ER diagram and how is the RELATIONSHIP displayed in the ER diagram?
How ENTITIES act upon each other or are associated with each other. Think of RELATIONSHIPS as verbs.
Examples would be “works in”, “goes to”, “teaches”, “studies”, “carrying” “has”, “contains” etc..
RELATIONSHIPS are typically displayed as diamonds.
How would you portray the KEY ATTRIBUTE to distinguish it from other attributes of an ENTITY in an ER diagram?
The KEY ATTRIBUTE should be portrayed with underline.
What is a RECURSIVE RELATIONSHIP in an ER diagram?
When there is a relationship between two entities of the same type, it is known as a recursive relationship. This means that the relationship is between different instances of the same entity type
Ex: An employee can supervise multiple employees. Hence, this is a recursive relationship of entity employee with itself. This is a 1 to many recursive relationship as one employee supervises many employees.
In an ER model this is shown as a relationship which “connects” to the same entity twice.
How would you describe a PRIMARY KEY in DBMS?
A PRIMARY KEY is a column of a table or a set of columns that helps to identify every record present in that table uniquely.
Can a table contain more than one PRIMARY KEY?
No, there can be only one PRIMARY KEY per table.
Can a PRIMARY KEY contain NULL values?
Can a PRIMARY KEY contain duplicates?
No and…. no.
What is a SUPER KEY?
A SUPER KEY is a single column or a set of columns which help identify a row uniquely.
What is a CANDIDATE KEY?
CANDIDATE KEYS are those attributes that uniquely identify rows of a table. The PRIMARY KEY of a table is selected from one of the CANDIDATE KEYS.
What is an ALTERNATE KEY?
When a PRIMARY KEY is chosen from the CANDIDATE KEYS the remaining ones that didn’t get chosen are considered ALTERNATE KEYS.
What is a FOREIGN KEY?
FOREIGN KEYS is used to establish relationships between two tables. A FOREIGN KEY will require each value in a column or set of columns to match the PRIMARY KEY of the referential table.
What is a COMPOSITE KEY?
COMPOSITE KEY is a set of two or more attributes that help identify each tuple in a table uniquely. The attributes in the set may not be unique when considered separately. However, when taken all together, they will ensure uniqueness.
What is a DATABASE MANAGEMENT SYSTEM (DBMS)?
A set of programs to access database which provide a way to store and retrieve
database information that is both convenient and efficient
Why use a DBMS? (5 reasons)
- Data independence and efficient access.
- Reduced application development time.
- Data integrity and security.
- Uniform data administration.
- Concurrent access, recovery from crashes
What is a data model?
A collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints
What FOUR categories of data models do we have?
▪ Relational Model
▪ Entity-Relationship Model
▪ Object-Based Data Model
▪ Semistructured Data Model
What is data independence?
Capacity to change the schema at one level of a database system without
having to change the schema at the next higher level
What is logical data independence?
Logical Data Independence is defined as the ability to make changes in the structure of the middle level of the Database Management System (DBMS) without affecting the highest-level schema or application programs
What is physical data independence?
Physical Data Independence is defined as the ability to make changes in the structure of the lowest level of the Database Management System (DBMS) without affecting the higher-level schemas.
What is concurrency in DBMS?
Concurrent execution of user programs
Why would concurrency be important in DBMS?
Good concurrent execution would mean better performance of the DBMS.