Chapter 16 - Database concepts Flashcards
What is an entity?
» Entity is a category of object,person,event or thing of interest to an organisation about which data is to be recorded
What does each entity in a database have?
» List of attributes/fields
What is another name for a simple database?
» Called a flat file, consiting of information about a single entity - consisting of a single file
What is the format of an entity discription?
» Entity1(Attribute1, Attribute2…)
What is an example of a discription for an entity which is called product?
» Product(Title,Subject,Author,Length)
What is needed to uniquely identify the entity?
» An Identifier
What is the identifier known as in a relational database?
» Primary key
What is the purpose of the primary key?
» To identify a particular record relationship database
What is the format for a primary key?
» Customer(CustId,title,firstname)
» CustId is the primary key in this instant as it is unique
Why is a secondary index needed
» To search the database quickly such as the surname in a patients file
What is a composite primary key?
» A primary key which consists of more than one attribute is called a composite primary key
What are the 3 different degrees of relationship between 2 entities?
» One-to-one
» One-to-many
» Many-to-many
What is an example of a one to one relationship?
» A husband and wife
What is an example of a one to many relationship?
» Mother and a child
» As a mother may have many children, but each child has the same mother
What is an example of a many to many relationship?
» Film and actor