Databases 101 Module #55 Flashcards

1
Q

What are the main properties of a DBMS (Database Management System)?

A
  1. Efficient: a database needs to provide the best performance to store and retrieve data.
  2. Persistent: data stored in the database is stored permanently. When the database software is terminated or the machine reboots, the data ( excluding hardware failures should remain).
  3. Privacy and security: a database provides us the ability to privately and securely store data. It allows access to multiple users, and each user shold be able to only access and edit the data it’s allowed to. Some users might only be able to access data and not edit or delete it.
  4. Shared access: multiple users need to be able, with proper permissions to access shared data. Multiple applications can access the same database too.
  5. Big: a database can handle huge amounts of data, and it can scale according to your needs, using various advanced techniques. That does not mean a data is just useful when you have a lot of data - it can be useful even with a very few data entries, due to the properties listed above.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some examples of Relational Database Management Systems?

A

MySQL, Postgres, and SQLite.

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

What is the best known conceptual data model?

A

The Entity-Relationship Model. It is the model that is closest to how we think.

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

What are some logic-based relationship models?

A
  1. The Relational Model
  2. Hierarchical Model
  3. The Reticular Model
  4. The Object Model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What ‘type’ of data model does the Entity-Relationship Data Model use?

A

It is a conceptual data model.

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

What is one big advantage of using an Entity-Relationship Model?

A

You don’t need to think at all about implementation, just how you want to organize your data.

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

What 2 items compose the Entity-Relationship Model?

A
  1. The entities (types of data: items or people that have common properties)
  2. The relations-Relations between the entities in the database. (Example: {book: ‘author’}, it’s how the entities are related to each other.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Handy to know just in terms of JS…What does 1,n and 0,n mean?

A

1, n = 1 or more entities and n means any number of elements aka (one-to-many relationship).

0,n = Zero Entities to n (which could be many) Aka Zero-to-many relationship

Example:
The numbers above mean this: a book can be authored by 1 or more authors. n means any number of elements.

And an author can have authored from 0 books (maybe it’s writing one now) to an infinite number of books.

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

How many attributes can an entity in a DB have?

A

1 or more

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

How are entities identified in a DB?

A

They need to have a key assigned to them. However, a single entity can have many identifier attributes, sometimes it is best to have a randomly generated ID assigned.

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

What gives us even more background information about a given entity, but is not directly related?

A

Relational attributes are entities that belong to the relationship between objects who have attributes of their own.

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

What are cardinalities when talking about databases.

A

Cardinalities are the number of entities, relations, and their attributes.

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

What exactly is a “Weak Entity” ?

A

Weak entities depend on other entities in order to exist. For example: the order ID for an item that has been ordered by a customer.

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

What are recursive relationships?

A

A relationship between two entities of a similar entity type is called a recursive relationship. Here the same entity type participates more than once in a relationship type with a different role for each instance. In other words, a relationship has always been between occurrences in two different entities. However, the same entity can participate in the relationship. This is termed a recursive relationship.

https://www.geeksforgeeks.org/recursive-relationships-in-er-diagrams/

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

How can we describe ISA relationships?

A

It is a way to generalize or group similar entities under one umbrella.

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

What kinds of databases use the relational model? And what methods/concepts do they use to power the database?

A

SQL databases, which use tables and relations.

17
Q

Where is the data stored in a relational database?

A

Tables.

18
Q

What is the basic structure of a table?

A

Tables contain 1 or more columns and row and those they hold strings, numbers and other data types.

19
Q

What is the definition of schema?

A

The tables themselves and the rules about its columns is called the schema.

Or put another way by Techwallla: https://www.techwalla.com/articles/what-is-relational-database-schema

A relational schema for a database is an outline of how data is organized. It can be a graphic illustration or another kind of chart used by programmers to understand how each table is laid out, including the columns and the types of data they hold and how tables connect.

20
Q

What role does the Database Management System play on a computer system?

A

It is the software that implements the database on the system.