HW1

.pdf

School

Purdue University *

*We aren’t endorsed by this school

Course

448

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

7

Uploaded by JusticeClover34803 on coursehero.com

Shatakshi Singh Homework 1 CS 448 Collaboration statement: Cited Fundamentals of Database Systems by Elmasri & Navathe, 7th Edition for Questions 1-7, Wikipedia Question 1. (0.50 pts) (a) Discuss the main capabilities that should be provided by a DBMS. (b) Highlight the difference of using a database system with respect to the following approaches. Please, make sure to highlight the benefits offered by a DBMS. b.1) Traditional file systems. b.2) In memory storage Solution: a) The main capabilities that should be provided by a DBMS include: 1. Data definition and modeling: The ability to define the structure of the data and the relationships between different data elements. 2. Data storage and retrieval: The ability to store data in a structured format and retrieve it quickly and efficiently. 3. Data manipulation: The ability to update, delete, and insert data into the database. 4. Data integrity and security: The ability to enforce constraints and rules to ensure the accuracy and consistency of the data, and to protect the database from unauthorized access. 5. Concurrency control: The ability to handle multiple users accessing and updating the database simultaneously, without conflicts. 6. Backup and recovery: The ability to protect against data loss and to recover data in case of system failure. 7. Query and reporting: The ability to retrieve specific data from the database and generate reports. 8. Data mining and analytics: The ability to extract useful insights from the data stored in the database. b) b.1) Traditional file systems: In traditional file systems, data is stored in individual files, and there is no central management of the data. This leads to problems such as data redundancy and inconsistencies, lack of data security, and difficulties in data sharing and multi-user transactions. A DBMS, on the other hand, provides a centralized approach to data management, with features such as data modeling, data integrity and security, and query and reporting capabilities. b.2) In memory storage: In memory storage stores data within the memory of the current computer, which can be faster than a DBMS because it eliminates the extra step of taking data from the disk. However, memory storage is relatively limited, and thus it is suitable only for smaller databases. A DBMS, on the other hand, can handle larger databases and provides additional features such as data manipulation, backup and recovery, and data mining and analytics. Additionally, DBMS provide a more robust solution for multi-user and concurrent access which is not feasible with in-memory storage.
Question 2. (0.50 pts) Cite some examples of integrity constraints that you think can apply to the database shown in Figure 1.2 in the textbook. Please, provide at least two examples for each type of the following constraints: unique constraints and referential integrity constraints Solution: Unique Constraints: Unique integrity constraints ensure that each value in a column or set of columns is unique across the entire table. 1. The Student_Number should be unique for each STUDENT record. 2. The Course_Number should be unique for each COURSE record. Referential Integrity Constraints: Referential integrity constraints are used to maintain relationships between tables. 1. A Student_Number value in the GRADE_REPORT should also exist in a STUDENT record. 2. A Course_Number value in the SECTION should also exist in a COURSE record.
Question 3. (0.25 pts) What is the difference between a database schema and a database state? Please, use examples to support your answer. Solution: Database Schema: A database schema defines the (logical) structure and organization of a database including the tables, fields, relationships, and constraints. It is a blueprint for the database and describes how data should be organized and stored. Ex: Table: customers contains Fields: id, name, email, address Database State: A database state refers to the actual (Physical) data stored in the database at a given point in time. This includes the data entered into the tables and fields defined by the schema, as well as any constraints and relationships that have been established. Ex: Table: customers contains Fields: id: 1, name: "John Doe", email: " johndoe@example.com ", address: "123 Main St" id: 2, name: "Jane Smith", email: " janesmith@example.com ", address: "456 Park Ave"
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help