DATABASES Flashcards

1
Q

Schema

A

determines how data is organized between tables in your database.

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

Database Schema

A

The structure of a database. (Data is organized into Tables with columns and rows) A blank structure without information.

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

Schema Objects

A

Parts of a schema (like tables, columns, relationships, data types, keys)

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

What are the 4 benefits to using a Database Schema?

A

1) Better management via logical groupings for objects
2) Better Accessibility
3) More Security Features
4) Permits ownership transfer between users

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

Database Modeling

A

Designing the database schema before inputting information.

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

3 Categories of a Database Schema

A

aka the “three-schema architecture”
1) Conceptual/logical schema (defines entities, attributes, tables and relationships)

2) Internal/physical schema that (defines the actual storage of data and access paths.)

3) External/view schema that (defines different user views.)

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

conceptual or logical schema

A

describes the structure of the entire database for all the users. It describes the structure in terms of entities and features of the entities and the relationships between them. An Entity Relationship Diagram (ER-D) is usually drawn to represent the logical schema of a database.
-At this level, details about the physical storage and retrieval of data are hidden, and the database structure is described only at a concept level. The software developers work with the database at this level.

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

internal or physical schema

A

describes the physical storage of the database. It represents the entire database but at a very low level. This means it describes how the data is really stored on disk in the form of tables, columns and records. It defines what data is stored in the database and how.

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

external or view schema

A

describes the database like an external user would want to see it. This schema only describes the part of the database that the specific user is interested in. It hides the nonrelevant details of the database from a user. For example, a user from the sales department will see only sales-related data in a database. There can be many external schemas of a single database for different users.

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

What 3 Things does a Database Schema Help Data Engineers Do?

A

1)Maintain a clean set of data in the database related to an application.

2)Avoid reverse-engineering of the underlying data model from time to time.

3)Write efficient queries to retrieve data for reporting purposes, analytics and so on.
-In other words, it prevents you from ending up with a database design that requires a database engineer to do a lot of reverse-engineering down the line, wasting time and effort that leads to increased costs for organizations.

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

ER Modeling (Entity Relationship Modeling)

A

Graph illustrating relationships between entity types.

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

Logical Database Schema

A

Refers to the organization of data in tables or entities.

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

Physical Database Schema

A

How the physical structure of a database is stored on a disk. (or step 2 after making a Logical Database Schema)

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

ER-D

A

Entity Relationship Diagram

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

Name the 3 Possible Table Relationships

A

1) One to Many
2) One to One
3) Many to Many

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

Relational Model

A

The relational model is built around three main concepts which are:

Data, Relationships, and constraints.

It describes a database as “a collection of inter-related relations (or tables)”. It is still a dominant model used for data storage and retrieval. In essence, it is a way of organizing or storing data in a database. SQL is the language that’s used to retrieve data from a relational database.
(The Relational Database Model is the most widely used data model for commercial databases.)

17
Q

What’s another name for a Row?

A

Record orTuple

18
Q

What’s another name for a Column?

A

Fields or Attributes

19
Q

What’s another name for a Table?

A

A Relation: A relation represents a file that stores data

20
Q

What’s another name for the data stored in a column.

A

an Instance

21
Q

Domain

A

The domain is a set of acceptable values that a column is allowed to contain. The domain depends on the data type of the column

22
Q

What’s another name for the Primary key?

A

Relation key

23
Q

Degree

A

Degree is the number of columns or attributes within a relation. A student table that stores the student’s name, address, phone number and email address would have a degree of four.

24
Q

Cardinality

A

refers to how many records there are within a particular table in a database. If you have 100 students in your student table, with all their information organized into individual rows, then that table has a cardinality of 100

25
Q

relational integrity constraints

A

The three conditions that must be met for a relation to be valid. They are called relational integrity constraints and they are:
1) Key constraints
2) Domain constraints
3) Referential integrity constraints

26
Q

key attribute

A

a key attribute is an identifier that can be used to refer to a record. It must also be unique for each record. For example, you can use the Student ID in the student table as the key. This means that there can’t be two students with the same Student ID. (Cannot be NULL)

27
Q

Candidate Key

A

An attribute unique to each row of a Table

28
Q

Composite Primary Key

A

a combination of 2 or more attributes. This key is used when there is no unique rows to label as the primary key.