Databases 101 Module #55 Flashcards
What are the main properties of a DBMS (Database Management System)?
- Efficient: a database needs to provide the best performance to store and retrieve data.
- 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).
- 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.
- Shared access: multiple users need to be able, with proper permissions to access shared data. Multiple applications can access the same database too.
- 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.
What are some examples of Relational Database Management Systems?
MySQL, Postgres, and SQLite.
What is the best known conceptual data model?
The Entity-Relationship Model. It is the model that is closest to how we think.
What are some logic-based relationship models?
- The Relational Model
- Hierarchical Model
- The Reticular Model
- The Object Model
What ‘type’ of data model does the Entity-Relationship Data Model use?
It is a conceptual data model.
What is one big advantage of using an Entity-Relationship Model?
You don’t need to think at all about implementation, just how you want to organize your data.
What 2 items compose the Entity-Relationship Model?
- The entities (types of data: items or people that have common properties)
- The relations-Relations between the entities in the database. (Example: {book: ‘author’}, it’s how the entities are related to each other.
Handy to know just in terms of JS…What does 1,n and 0,n mean?
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 many attributes can an entity in a DB have?
1 or more
How are entities identified in a DB?
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.
What gives us even more background information about a given entity, but is not directly related?
Relational attributes are entities that belong to the relationship between objects who have attributes of their own.
What are cardinalities when talking about databases.
Cardinalities are the number of entities, relations, and their attributes.
What exactly is a “Weak Entity” ?
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.
What are recursive relationships?
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 can we describe ISA relationships?
It is a way to generalize or group similar entities under one umbrella.