Chapter 16 - Database concepts Flashcards

You may prefer our related Brainscape-certified 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does each entity in a database have?

A

» List of attributes/fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the format of an entity discription?

A

» Entity1(Attribute1, Attribute2…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

» Product(Title,Subject,Author,Length)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is needed to uniquely identify the entity?

A

» An Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the identifier known as in a relational database?

A

» Primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the primary key?

A

» To identify a particular record relationship database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is a secondary index needed

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an example of a one to one relationship?

A

» A husband and wife

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an example of a many to many relationship?

A

» Film and actor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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