Flashcards in 1.3.2 Databases Deck (13)
What is a primary key?
A field which has a unique value for every record.
What is a entity?
An entity is a category of data to be recorded in a database, entities have attributes.
What is a flat file database?
A database that consists of a single file.
What is an attribute?
The data attached to an entity. For example the entity Dentist might have the attribute name.
Write the entity description format out.
Entity (Attribute1, Attribute2)
What is the need for a secondary key?
A secondary key is indexed allowing for faster
How can an entity relationship be modeled?
|Entity|(One/Many)----(Name of the relationship)---(One/Many)|Entity|
What are the three degrees of relationships in a relational database?
One to one, One to many, Many to many.
How does a relational database work?
In a relational database a separate table is created for each entity identified, where a relationship exists between entities an extra field is added to the tables to link them.
What is a foreign key?
An attribute that creates a join between two tables and will be the primary key of one of the tables and the foreign in the other.
What needs to be done in the case of a many to many relationship?
An extra table is needed in order to link both tables consisting of foreign keys.
What is a composite key?
A primary key that consists of more than one attribute.