Chapter 16 - Database concepts
No description yet. This curated deck is ready for daily study.
Card preview (24)
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
What is the purpose of an entity relationship diagram?
» A diagrammatic way of representing the relationships between the entities in a databse
What 2 things needed to be specified in a E-R diagram?
» The degree of relationship » The name of the relationship
Describe the E-R diagram of a Headteacher and a School
» One to one relationship » Headteacher in charge of School
What is created in a relational database?
» A seperate table is created for each entity identified in thre system
What is the foreign key?
» An extra field/attribute that links the 2 tables
What is the purpose of the Foreign key?
» An attribute that creates a join between two tables » Attribute that is common to both tables » Primary key in one table is the foreign key in the table to which it is linked
What is the primary key indicated by?
» Asterisk
What is the foreign key indicated by?
» Italics
How is the one-to-one degree shown in an E-R diagram?
» A straight line