11. Relational Database and ERD Flashcards
in 3 points what is an
entity
- this is an object that exists in a database such as a car, person, or bank account.
- each of these is unique within a table althogh will share the same attributes
- a table will hold many of them
what are
attributes
these are given to entities so that each entity can hold its own charcteristics and be unique
example
a person entity might be given an age and name
describe a
table and structure
this will define an entity
- it will contain columns and rows where
- columns
- define the attributes each entity can have
- rows
- each row is a record
- each record is an entity instance
- columns
describe an
entity type
this is often the name of the table and is where we have a collection of entities that share the same attributes
example
an entity type of employees where each entity of the entity type would be an employees that all share the same attribute
how is an
entity type
represented
this is represented in a database as a table
what is an
enity instance
this is a record that has been placed inside a table and has been given attributes
what are the two
types of entities
these include:
- tangible
- intagible
describe a
tangible entity
this is something that exist in the real world physically and can be touched.
Example:
Person, car, etc.
describe an
intangible entity
this is something that exist only logically and has no physical existence.
Example:
Bank Account, job
what does the accronym
ERD
stand for
this accronym is
Entity Relationship Diagram (ERD)
what is an
Entity Relationship Diagram (ERD)
This is a diagram that shows the structure and the relationships of tables within a database.
what are two advantages of an
Entity Relationship Diagram (ERD)
these include:
Design - these are often created before the database as they help to foresee any issues and help plan what will be required within the database
Debugging - large databases with many tables can be hard to navigate and understand any connections. This can help identify problems by having a high level view of how the database has been designed
what 5 pieces of information will you find within an
Entity Relationship Diagram (ERD)
within this you will find information such as:
- Tables and its entity
- Attributes of an entity
- Relationships between entities
- Primary keys
- Foreign keys
what is a
primary key
this is used so that each record / entity instance within an entity / table can be uniquely identified.
how many times can a
primary key
occur in a table
this can only occur once within a table.