Podcast
Questions and Answers
What is the primary role of a Database Management System (DBMS)?
What is the primary role of a Database Management System (DBMS)?
- To encrypt data for security purposes.
- To design the graphical user interface of an application.
- To provide an interface between users and databases, enabling data manipulation. (correct)
- To physically store data on a hard drive.
Which of the following is NOT a core functionality of a DBMS?
Which of the following is NOT a core functionality of a DBMS?
- Data storage, retrieval, and update.
- Enforcing constraints to ensure data integrity.
- Supporting transactions and concurrency.
- Creating marketing strategies based on customer data. (correct)
In the context of databases, what does 'data redundancy' primarily refer to?
In the context of databases, what does 'data redundancy' primarily refer to?
- Deleting old and irrelevant data from the database.
- Compressing data to save storage space.
- Storing the same data multiple times within a database. (correct)
- Having insufficient backup copies of critical data.
Why is it important to avoid data redundancy in database design?
Why is it important to avoid data redundancy in database design?
Which type of database is best suited for handling unstructured, unpredictable data, making it ideal for big data applications?
Which type of database is best suited for handling unstructured, unpredictable data, making it ideal for big data applications?
Which of the following best describes the role of an Entity-Relationship Diagram (ERD) in database design?
Which of the following best describes the role of an Entity-Relationship Diagram (ERD) in database design?
What is the purpose of using primary keys in database tables?
What is the purpose of using primary keys in database tables?
Which of the following is a disadvantage of using large random numbers (UUIDs) as primary keys?
Which of the following is a disadvantage of using large random numbers (UUIDs) as primary keys?
In an ERD, what does a diamond shape typically represent?
In an ERD, what does a diamond shape typically represent?
Which of the following is an advantage of using a database-generated sequence number as a primary key?
Which of the following is an advantage of using a database-generated sequence number as a primary key?
What is the significance of defining the cardinality (e.g., one-to-many) in the relationships between entities in an ERD?
What is the significance of defining the cardinality (e.g., one-to-many) in the relationships between entities in an ERD?
Consider an online shop database. If the relationship between 'Order' and 'Product' includes a 'quantity' attribute, what problem does this address?
Consider an online shop database. If the relationship between 'Order' and 'Product' includes a 'quantity' attribute, what problem does this address?
Which database type is commonly used in applications requiring high performance, complex calculations, and faster results by allowing the definition of objects?
Which database type is commonly used in applications requiring high performance, complex calculations, and faster results by allowing the definition of objects?
What significant problem arises from not converting an ERD into a set of tables during database design?
What significant problem arises from not converting an ERD into a set of tables during database design?
Which of the following scenarios is MOST suitable for using a Non-relational (NoSQL) database over a Relational Database (RDB)?
Which of the following scenarios is MOST suitable for using a Non-relational (NoSQL) database over a Relational Database (RDB)?
How does SQLite differ from other relational database management systems (RDBMS) like MySQL or Oracle?
How does SQLite differ from other relational database management systems (RDBMS) like MySQL or Oracle?
In the context of ERDs, which of the following best describes the term 'entity'?
In the context of ERDs, which of the following best describes the term 'entity'?
Consider a database design for a library system. There are entities for 'Book', 'Author', and 'Loan'. What type of relationship is most likely to exist between 'Book' and 'Author'?
Consider a database design for a library system. There are entities for 'Book', 'Author', and 'Loan'. What type of relationship is most likely to exist between 'Book' and 'Author'?
A university database stores student information. There are tables for Students, Courses, and Enrollments. What is the MOST appropriate primary key for the Enrollments table?
A university database stores student information. There are tables for Students, Courses, and Enrollments. What is the MOST appropriate primary key for the Enrollments table?
Imagine you are designing a social media platform. Which type of database would be MOST suitable for storing the relationships between users (e.g., Friendships, Followers)?
Imagine you are designing a social media platform. Which type of database would be MOST suitable for storing the relationships between users (e.g., Friendships, Followers)?
Flashcards
Database
Database
A collection of data organised for access, retrieval, modification and use.
Database Management System (DBMS)
Database Management System (DBMS)
Software for creating and managing databases, acting as an interface between users and the database.
Relational Database (RDB)
Relational Database (RDB)
Data stored in interrelated tables, allowing efficient querying and manipulation using SQL.
Object-Oriented Database (OODB)
Object-Oriented Database (OODB)
Signup and view all the flashcards
Network Database
Network Database
Signup and view all the flashcards
Non-Relational Database (NoSQL)
Non-Relational Database (NoSQL)
Signup and view all the flashcards
Entity-Relationship Diagram (ERD)
Entity-Relationship Diagram (ERD)
Signup and view all the flashcards
Entity
Entity
Signup and view all the flashcards
Relationship
Relationship
Signup and view all the flashcards
Database-Generated Sequence Number
Database-Generated Sequence Number
Signup and view all the flashcards
Universally Unique Identifier (UUID)
Universally Unique Identifier (UUID)
Signup and view all the flashcards
Study Notes
- A database is a structured collection of data that enables access, retrieval, modification, and utilization of that data.
- Database Management Systems (DBMS) are software used for creating and managing databases, serving as an interface between users and the database.
- DBMS functionalities include data storage, retrieval, and updates, transaction and concurrency support, recovery mechanisms, authorization, remote access support, and constraint enforcement.
Database Types
- Relational Databases (RDB): Store data in interrelated tables. Examples: Microsoft SQL Server, Oracle, and MySQL.
- Object-Oriented Databases (OODB): Allow definition of objects for high performance applications. Example: ObjectBox.
- Network Databases: Feature multiple member records linked to multiple owner files. Example: IMAGE.
- Non-Relational Databases (NoSQL): Suited for unstructured, unpredictable data ("big data"). Example: Apache Cassandra.
Relational Databases
- Organize data into tables with rows (records/tuples) and columns (fields/attributes).
- Utilize SQL for efficient querying and manipulation.
- SQLite is suitable for mobile apps. It is a simplified relational database that doesn't require a dedicated server.
Database design
- Four basic steps for database design:
- Model the problem into an entity–relationship diagram (ERD).
- Convert the ERD into a set of tables.
- Create the tables in the database using SQL and import any data.
- Create queries to extract information.
- Online shop example shows repeated data. Multiple tables are better.
Entity–Relationship Diagrams (ERDs)
- An ERD is a structural diagram visualizing:
- Major entities within the system scope.
- Interrelationships among these entities.
- Entities often refer to business objects like people/roles (e.g., student), tangible objects (e.g., product), and intangible objects (e.g., log).
- Entities are drawn as rectangles, relations as diamonds, connected by lines.
- Relationships are expressed as verbs. The shown relationship is one-to-many (1:M).
- The four entities in the online shop example include Customer, Product, Order and Brand.
Primary Keys
- Options for developing primary keys:
- Database-generated sequence number: The database creates IDs for you.
- Large random numbers:UUIDs are very large numbers generated randomly. The probability of generating the same one twice is negligible.
Adding Attributes to Relationships
- Ask questions to determine attributes for each entity, e.g., What information do we need about the customer/order/product/brand?
- Relationships can have attributes, such as including a quantity attribute in the relationship between order and product which reduces redundancies.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.