Week 1 - Databases

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/56

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

57 Terms

1
New cards

what is a database?

a group of related data

2
New cards

what is data?

piece of information that has some meaning associated with it

3
New cards

what is a mini-world?

some part of the real world about which data is stored in the data base

4
New cards

what is a database management system (DBMS)?

a software that will manage our database

5
New cards

what is a flat file?

one line of it is a record; each thing separated by a comma is data; a group of flat files is a database

<p>one line of it is a record; each thing separated by a comma is data; a group of flat files is a database</p>
6
New cards

why is a DBMS better than using the flat file system?

  • Data redundancy/inconsistency is reduced

  • Isolates the program from the data

  • Provides persistent storage of data

  • Multiple users can use it

  • Data is abstracted

  • Security, integrity and backups

  • Generalized query tools

  • Provides multiple user interfaces

  • Possible to enforce standards since data is centralized

  • Reduced development time

  • Up to date information managed centrally

7
New cards

what are the disadvantages of DBMS?

  • Flat Files are cheap (are free)

  • DBMS requires maintenance

  • DBMS are initially complex

8
New cards

what does a database administrator do?

  • Give and revoke access to the database for new people

  • Installing and upgrading the DBMS

  • Monitor and improve the performance

  • Backing up and restoring databases

9
New cards

what does a database designer do?

  • dentify and collect all data that is to be stored

  • Identify relationships between data

  • Create model of the data

  • Structure the data

  • Communicate with end users to identify their needs

10
New cards

what does a system analysis and application programmer do?

  • Determine needs of end users

  • Develop spec for the system

  • Develop software that communicates to the database

  • Test implementation too

11
New cards

what do end users do?

  • Access database

  • Using the database

12
New cards

what is a schema?

a description of the database but NOT the data itself (kind of like types in programming languages)

13
New cards

what is a state/snapshot?

The data in the database at a moment in time — so every time we delete or add or change a value of a data item we change the state

14
New cards

what is the schema of the schema?

meta data — like what tables and columns exist

15
New cards

what are the 3 levels of the 3 schema architecture?

internal level, conceptual level, and external level

16
New cards

what is the Internal level?

the internal level describes the data storage and indices to get to the data; hard disk

17
New cards

what is the conceptual level?

the data in the database is stored in tables

18
New cards

what is the external level

shows the data that each end user is interested in and hides the other data

19
New cards

what is logical data independence?

the capacity to change the conceptual schema without affecting the external schema or views

20
New cards

what is physical data independence?

the ability the change the internal schema without changing the conceptual schema

21
New cards

where and how do we start building the DBMS?

  1. start with DATA and not the code

  2. Narrow your scope as much as possible and figure out what data you need to store/save by:

    • Gather reposts your customers use/print/generate

    • Look at any screens where the customer enter/modify data

    • Find the requirements of your customers/stakeholders

    • Figure out how they view the data

    • Integrate the views to get the minimal data that you need to store

22
New cards

what is an entity?

a single “THING” that exists — has independent existence; it is any object in our mini-world that we want to model and store information about

23
New cards

what is an entity type?

a set of entities that have the same set of attributes

24
New cards

what is an attribute?

describes a “thing”; it defines the information about the entity that needs to be store; an entity has a domain

25
New cards

what is a composite attribute?

an attribute that can be broken down further (eg. name = Bart Simpson; can be broken down into last name and first name)

26
New cards

what is an atomic/simple attribute?

and attribute that cannot be broken down any further eg. age = 45

27
New cards

what is a single-valued attribute?

an attribute that can only take one value (eg. age)

28
New cards

what is a multivalued attribute?

an attribute that can take on multiple values (eg. college degrees)

29
New cards

what is a derived attribute?

an attribute that can be derived from other data — doesnt have to physically exist in the database (eg. age can be derived from birthdate)

30
New cards

what is a stored attribute?

an attribute that the database stores and keeps (eg. birthdate is permanently stored instead of age because age changes every year)

31
New cards

what is a key attribute?

has uniqueness (eg. student number)

32
New cards

what is a value?

is taken on by an attribute

33
New cards

what is a domain?

the type of values that an attribute can take (eg. string, integer, real)

34
New cards

what are null values?

used for information that is not applicable or unknown (eg. Apartment number — maybe the person lives in a house. Or phone number — maybe we don’t know the phone number)

35
New cards

what is the ER diagram notation for entity type

knowt flashcard image
36
New cards

what is the ER diagram notation for attribute?

knowt flashcard image
37
New cards

what is the ER diagram notation for a key attribute

knowt flashcard image
38
New cards

what is the ER diagram notation for a multivalued attribute?

knowt flashcard image
39
New cards

what is the ER diagram notation for a composite attribute?

knowt flashcard image
40
New cards

what is the ER diagram notation for a derived attribute?

knowt flashcard image
41
New cards

what is a relationship?

a named grouping of entites

42
New cards

what is a relationship set?

an ordered list of entity sets

43
New cards

what a relationship type R

among n entity types E1, E2…En defines a set os associations among entities. So R is a set of relationship instances ri, where each ri associates n entities (e1, e2,…,en) and each entity ej in ri is a member of entity type Ej, 1≤ j ≤ n. Hence a relationship type is a mathematical relation on E1, E2, ..En

eg (”Reid”, “CS3319”) is a relationship set of (Prof, Course); relationship type would be “teaches”

<p>among n entity types E1, E2…En defines a set os associations among entities. So R is a set of relationship instances ri, where each ri associates n entities (e1, e2,…,en) and each entity ej in ri is a member of entity type Ej, 1≤ j ≤ n. Hence a relationship type is a mathematical relation on E1, E2, ..En</p><p></p><p>eg (”Reid”, “CS3319”) is a relationship set of (Prof, Course); relationship type would be “teaches”</p>
44
New cards

what is a recursive (unary) relationship?

an entity of one entity type that has a relationship with other entities of that same entity

45
New cards

what are attributes on relalationships?

describes some pieces of information about the relationship ((eg. A Student takes a Course, the Grade would be attributed to that relationship)

<p>describes some pieces of information about the relationship ((eg. A Student <span style="color: inherit;">takes</span> a Course, the Grade would be attributed to that relationship)</p>
46
New cards

what is a cardinality ratio?

number of relationships instances that entity can participate in

47
New cards

what are the different types of cardinality ratios?

  • One-to-one

  • One-to-Many

  • Many-to-many

<ul><li><p>One-to-one</p></li><li><p>One-to-Many</p></li><li><p>Many-to-many</p></li></ul><p></p>
48
New cards

what is a participation constraint?

specifies whether the existence of an entity depends on it being related to another entity via the relationship type

49
New cards

what is total (mandatory) participation?

every entity in the entity set must be related to the other entity set via the relationship (eg. every employee must Work_For a department)

denoted as double line

50
New cards

what is partial (optional) participation?

some or part of the entity set are related to the other entity set but not necessarily all (eg. some employees manage a department but not all)

denoted as a single line

51
New cards

what is (min, max) notation?

where 0 ≤ min ≤ max and max ≥ 1; each entity must participate in at least min and at most max relationships; so a min of 0 implies partial participation

52
New cards

what is a weak entity?

  1. If an entity’s key attribute is not a true key that does not uniquely identify the entity, the entity type might be a Weak Entity

  2. If one Entity cannot exist without the existence of the other Entity (its Owner) which it has a relationship with, that Entity Type might be a Weak Entity

  • Have no key attribute of their own

  • Cannot exist without its identifying owner

  • Always has total participation with its identifying owner

  • Always has a double line around the relationship with its identifying owner

  • The identifying owner does not have to have 1 weak entity

  • Can sometimes be represented as composite, multi-valued attributes

  • Use a dashed underline to show the partial key of the weak entity

  • Use a double outlined diamond to show the relationship with the owner entity

<ol><li><p>If an entity’s key attribute is not a true key that does not uniquely identify the entity, the entity type might be a Weak Entity</p></li><li><p>If one Entity cannot exist without the existence of the other Entity (its Owner) which it has a relationship with, that Entity Type might be a Weak Entity</p></li></ol><p></p><ul><li><p>Have no key attribute of their own</p></li><li><p>Cannot exist without its identifying owner</p></li><li><p>Always has total participation with its identifying owner</p></li><li><p>Always has a double line around the relationship with its identifying owner</p></li><li><p>The identifying owner does not have to have 1 weak entity</p></li><li><p>Can sometimes be represented as composite, multi-valued attributes</p></li><li><p>Use a dashed underline to show the partial key of the weak entity</p></li><li><p>Use a double outlined diamond to show the relationship with the owner entity</p></li></ul><p></p>
53
New cards
<p>what does this represent</p>

what does this represent

zero or more

54
New cards
<p>what does this represent</p>

what does this represent

one or more

55
New cards
<p>what does this represent</p>

what does this represent

one and only one

56
New cards
<p>what does this represent?</p>

what does this represent?

zero or 1

57
New cards

Explore top flashcards