Chapter 16 - Database concepts Flashcards Preview

A OCR Computer Science A level > Chapter 16 - Database concepts > Flashcards

Flashcards in Chapter 16 - Database concepts Deck (33)
Loading flashcards...
1
Q

What is an entity?

A

» Entity is a category of object,person,event or thing of interest to an organisation about which data is to be recorded

2
Q

What does each entity in a database have?

A

» List of attributes/fields

3
Q

What is another name for a simple database?

A

» Called a flat file, consiting of information about a single entity - consisting of a single file

4
Q

What is the format of an entity discription?

A

» Entity1(Attribute1, Attribute2…)

5
Q

What is an example of a discription for an entity which is called product?

A

» Product(Title,Subject,Author,Length)

6
Q

What is needed to uniquely identify the entity?

A

» An Identifier

7
Q

What is the identifier known as in a relational database?

A

» Primary key

8
Q

What is the purpose of the primary key?

A

» To identify a particular record relationship database

9
Q

What is the format for a primary key?

A

» Customer(CustId,title,firstname)
» CustId is the primary key in this instant as it is unique

10
Q

Why is a secondary index needed

A

» To search the database quickly such as the surname in a patients file

11
Q

What is a composite primary key?

A

» A primary key which consists of more than one attribute is called a composite primary key

12
Q

What are the 3 different degrees of relationship between 2 entities?

A

» One-to-one
» One-to-many
» Many-to-many

13
Q

What is an example of a one to one relationship?

A

» A husband and wife

14
Q

What is an example of a one to many relationship?

A

» Mother and a child
» As a mother may have many children, but each child has the same mother

15
Q

What is an example of a many to many relationship?

A

» Film and actor

16
Q

What is the purpose of an entity relationship diagram?

A

» A diagrammatic way of representing the relationships between the entities in a databse

17
Q

What 2 things needed to be specified in a E-R diagram?

A

» The degree of relationship
» The name of the relationship

18
Q

Describe the E-R diagram of a Headteacher and a School

A

» One to one relationship
» Headteacher in charge of School

19
Q

What is created in a relational database?

A

» A seperate table is created for each entity identified in thre system

20
Q

What is the foreign key?

A

» An extra field/attribute that links the 2 tables

21
Q

What is the purpose of the Foreign key?

A

» 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

22
Q

What is the primary key indicated by?

A

» Asterisk

23
Q

What is the foreign key indicated by?

A

» Italics

24
Q

How is the one-to-one degree shown in an E-R diagram?

A

» A straight line

25
Q

How is the one-to-many relation shown in an E-R diagram?

A

» A straight line from the entity which is the one relationship to a crows foot in the entity which is the many

26
Q

How is the Many to Many relationship shown on an E-R diagram?

A

» 2 crows foots linking the entities

27
Q

What are tables also reffered by?

A

» Relations

28
Q

What is the structure of a relational database?

A

» Excel spreadsheet
» Each row containing entities
» Column containing attributes belonging to the records

29
Q

What is a record?

A

» A row in a database

30
Q

What is the problem of linking tables in a many-to many relaionship?

A

» Tables cannot be directly linked

31
Q

How can you resolve the issued of tables not being linked in a many-many relation in an E-R diagram?

A

» An extra table is needed to linke the 2 tables

32
Q

What is the important thing to remember when an entity is used in the a table?

A

» It is not delted in the table

33
Q

What is Referential integrity?

A

» It is the logical dependency of a foreign key on a primary key
» Means the reference from a row in one table to another table must be valid
» Values in that key match the values in a key in a related table

Decks in A OCR Computer Science A level Class (75):