Database Systems Chapter 6

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

flashcard set

Earn XP

Description and Tags

CS 4210 Module 6- Tranforming Data Models into Database Designs

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

client/server model

the standard model of networked traffic in today’s database designs

2
New cards

peer to peer model

devices communicated one to one, used before c/s model. servers couldn’t handle multiple calls at once.

3
New cards

Multi-tier architecture

separation and duplication of server/DBMS by decentralizing data and computing resources. improves reliability and throughput

4
New cards

Six layers of Multi-Tier Architecture systems

Persistence: DB which server files to the applications that service the clients or users
Accessor: the SQL server that does the thinking
Logic: Applications the user interacts with, providing instructions to the DB from which files are requested
Presentation: Applications that package data from DB to web browser languages (HTML/XML)
Requester/Consumer: client side web browser
Elsewhere: sources of info held on other platforms (AWS, Azure, etc)

5
New cards

Three main components of Client/Server Systems

Presentation: controls the inputs and outputs and makes data readable
Processing Logic: oversees turning a client’s request into a request the server can use
Storage Logic: physical data storage and processes it for retrieving on user request

6
New cards

Different Client/Server distributions

Thin Client- Client only handles presentation, Server handles storage and processing

Large Client- Client handles presentation and processing, Server handles Storage

Distributed Client- Client and server both share Processing.

7
New cards

which Client Server distribution is the most common

Large Client

8
New cards

Two-tier Architecture

Client communicates with server directly. Good for small workgroups, not large applications. Client covers UI Logic and DB accesses and processes requests from clients

9
New cards

Three (N-tier) Architecture

Includes another server layer. Makes it easier to scale the system. Extra layer can be an application server or hold local storage or databases. Reduces dependency and has better performance. Developers can work concurrently.

10
New cards

A ___ is transformed into a ____

Data Model; Database Design

11
New cards

Database Design

Set of Database specifications to be implemented as a DB in a DBMS. Data Model is non-DBMS specific, but Database Design is DBMS-specific

12
New cards

Three Database Design Stages

Conceptual, Logical, Physical

13
New cards

Steps for transforming a Data Model into a Database Design

1) Create table for each entity
- Specify PK (consider Surrogate keys), specify alternate keys, specify properties for each column, make sure it’s normalized

2) Created relationships by placing FKs

-relationships btwn strong entities (1:1,1:N,N:M), relationships w ID-Dependent entities, relationships with strong and weak (not ID), mixed relations, supertype/subtype relations, and recursive relations

3)Specify Logic for enforcing Minimum cardinality

(O-O,M-O,O-M,M-M)

14
New cards

Ideal primary key is

short, fixed, and numeric

15
New cards

Disadvantage of Surrogate keys

They are meaningless to users, when databases are shared multiple things might have the same surrogate key

16
New cards

Representing Alternate keys

AKn.m : n is the number of the alternate key, m is the column number in that alternate key.

17
New cards

Generic data types

char(n), Nchar(n), varchar(n), date, time, Integer, Decimal(m,n), Numeric(m,n), Money(m,n)

18
New cards

Domain constraints

Limits column values

19
New cards

Range constraints

Limits values of a row to particular intervals

20
New cards

Intrarelation Constraints

limits a columns value in comparison of other columns in the same table

21
New cards

Interrelation Constraints

Limits a columns values in comparison to other columns in other tables (the ref integrity constraint is a interrelation constraint)

22
New cards

How to implement a N:M relationship between strong entities

No place for FK in either table, so you create an intersection table, consisting of the primary keys of both tables, and each one is a PK and FK.

23
New cards

Uses for ID-Dependent Entities

rep N:M relationships, rep association relationships, rep multivalued attributes, rep archetype/instance relationships

24
New cards

An association table has

-all characteristics of intersection tables

-plus one or more columns of attributes specific to the associations of the other two entities

25
New cards

MUST Constraint (representing Ternary and higher order relationships)

requires that one entity must be combined with another entity in the ternary relationship ( if 20 → 2000 in one table, then another table with the second column has a 2000 entry, 20 must also be there)

26
New cards

MUST NOT constraint

requires certain combinations of entities arent allowed to occur (if someone is allergic to peanuts their entity and peanut entity can both exist)

27
New cards

MUST COVER constraint

a binary relationship specifies all combinations of two entities that must appear

28
New cards

cascading updates

when a change to a parents primary key is applied to the child’s foreign key

29
New cards

cascading deletes

when associated child rows are deleted along w/ the deletion of parent row

-generally, you don’t want to cascade delete strong entities, but you do with weak entities

30
New cards

triggers

module of code invoked by DBMS when specific events occur, used to enforce minimum cardinality for children and parents