INFS1000 Lec 4 Databases and Information Flashcards

1
Q

What are BUSINESS OBJECTS? Give some examples.

A
  • Things, people, processes with more than 1 single instance that we want to collect info about.
    e. g. Customers, products, suppliers, transactions, equipment, locations, staff.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of a DATABASE?

A
  • To store and organize info on important business objects.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why can’t spreadsheets do the same thing as a database?

A
  • Spreadsheets can only keep list of a SINGLE business object (e.g. data about customers).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a database do? What does a database contain?

A
  • Keeps lists of MULTIPLE business objects and their INTERRELATIONSHIPS (e.g. customers and their purchases).

Contains:

  1. Tables
  2. Relationships among tables
  3. Metadata
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the definition of a database?

A
  • a SELF-DESCRIBING collection of INTEGRATED RECORDS.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 4 steps in the overall database process?

A
  1. User: has to solve a problem using data stored in the DB (e.g. Check schedule of classes for the semester).
  2. Database Application: software component allows user to analyse, organize, present, print and display data - this is what the user sees.
  3. DBMS: software component organizes the access to the DB: read, write, delete, change of data.
  4. DB: tables, relationships, metadata.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the INFS names for rows, columns, characters, tables?

A

Rows / Records

Columns / Fields

Characters / Bytes

Tables / Files

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

What is the HIERARCHY of data elements in a table?

A
  1. Bytes / characters are grouped into columns / fields.
  2. Columns / fields are grouped into rows / records.
  3. Rows / records are grouped into tables / files.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do RELATIONSHIPS exist among tables?

A
  • Relationships exist between ROWS in different tables. These implement and represent BUSINESS RULES.
  • Relationship between rows are linked by KEYS (primary + foreign).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are PRIMARY KEYS?

A
  • Column / group of columns that uniquely identifies a row in a table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are FOREIGN KEYS?

A
  • Columns that are primary keys in other tables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are RELATIONAL DATABASES?

A
  • Databases using tables, primary keys, and foreign keys.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is METADATA? Give some examples.

A
  • Data about the data!

e. g.
* Field name (what is the column called).
* Data type (text, no, date DD/MM/YY etc).
* Field properties (e.g. length).
* Description (what is in it?).

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

What is a DATABASE MANAGEMENT SYSTEM (DBMS) and what does it do?

A
  • Program used to create, process, and administer a database.
  • Typically uses SQL (structured query language) and licensed from vendors. (e.g. Oracle, MySQL).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How is a database different from a DBMS / Database app?

A
  • Database is a collection of tables, relationships and metadata (i.e. a big file on a HARD-disk).
  • DBMS and apps are a SOFTware programs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a DATABASE APPLICATION?

A
  • Collection of (1) forms, (2) reports, (3) queries and application programs that make use of a database (e.g. SAP).
    e. g. order entry application, purchasing application.
17
Q

What do (1) forms, (2) reports, (3) queries in a database application do?

A
  1. Forms: used to read / insert / modify / delete data.
  2. Reports: calculates and shows data in a structured context for analysis. (e.g. ave age).
  3. Queries: are a means of getting answers from database data. Queries feed into reports.
18
Q

What is ER MODELLING? What NOTATION do we use?

A
  • Graphically representing business objects (entities) and the logical relationships between them.
  • Chen’s notation.
19
Q

What are the 4 elements in Chen’s notation? Give a definition and an example.

A
  1. Entity: Concept (people, places, things etc) which you wish to store info. (e.g. Tour guide).
  2. Entity Instance: Single occurrence of entity type (e.g. Tony Chan).
  3. Attribute: Characteristic of an entity type (e.g. Guide_ID, Guide_Name).
  4. Primary key: attribute that uniquely identifies each instance of an entity type. (e.g. Guide_ID)
20
Q

What are the corresponding elements in the database?

  1. Entity, 2. Entity instance, 3. Attribute
A
  1. Entity –> Table
  2. Entity instance –> Row
  3. Attribute –> Column
21
Q

What are the rules for the notation of an ENTITY?

A
  • Rectangle
  • All capital letters
  • Stated in SINGULAR (e.g. CONTRACTOR not CONTRACTORS).
  • Noun
22
Q

What are the rules for the notation of ATTRIBUTES?

A
  • Oval
  • Capitalize each word
  • Underscore between words
  • Primary Key is also underlined
  • Noun
23
Q

What are the rules for the notation of a RELATIONSHIP?

A
  • Diamond
  • No capitals, can use spaces
  • Verb (e.g. operates)
24
Q

What are the 2 types of relationships?

A
  1. Relationship (Type): an association between one or more entities. (i.e. Link between 2 tables). (e.g. CONTRACTOR operates TOUR).
  2. Relationship (Instance): Association between entity instances. (i.e. Link between 2 table entries). (e.g. Tony Chan operates April Murray River Tour). [Primary - foreign key].
25
Q

What are the 3 types of CARDINALITY?

A

One to many (1:M) = (M:1)

Many to many (M:M) - two (1:M) relationships.

One to one (1:1) - e.g. 1 customer is allowed to store 1 drivers license - treat as (1:M) in INFS1000.

26
Q

Give an example of a (1:M) relationship description?

A

“A department can hire may tutors, each tutor is hired by 1 department”

27
Q

What is the GOLDEN RULE for modelling relationships?

A
  • The PK of the 1-side entity is always the FK of the M-side entity.

!!!!! PK of associative entity is also its FK’s !!!!!

28
Q

What are the 2 reasons why we use two (1:M)’s rather than (M:M)?

1 - M - M - 1

A
  1. (M:M) will create many INEFFICIENCIES in the database.

2. PK’s will not be unique!

29
Q

What are the rules for the notation of an ASSOCIATIVE ENTITY?

A
  • Diamond Square
  • Capital letters, underline connector.
  • ADVISER_ STUDENT, or just OFFER.
  • Composite primary key