MENU

Advanced Database Features

91 viewsG10-09. Database
0

Question Title: Advanced Database Features

  1. Compare and contrast manual and electronic databases in terms of efficiency and security.
  2. Why is it important to set an appropriate field size when designing a manual database table?
  3. What problems might arise if data types are mismatched during conversion to an electronic database?
  4. How would you design a relational database with two tables for a library system tracking books and borrowers?
  5. What happens if a foreign key references a non-existent primary key in a DBMS?
Spread the love
Ruwan Suraweera Changed status to publish May 23, 2025
0

Answers and Descriptions:

  1. Answer: Manual databases (e.g., paper records) are less efficient due to slow retrieval and prone to loss, while electronic databases are faster and more secure with backups and passwords.
    Description: Searching a filing cabinet takes time and risks damage, whereas an electronic database can instantly find data and restrict access with security features.
  2. Answer: An appropriate field size (e.g., 10 characters for a name) prevents wasted space and ensures data fits correctly without truncation.
    Description: If โ€œNameโ€ is set to 5 characters, โ€œRobertโ€ would be cut to โ€œRober,โ€ causing errors. A size of 20 allows flexibility without excess.
  3. Answer: Mismatched data types (e.g., text instead of number for โ€œAgeโ€) prevent calculations or sorting, leading to errors.
    Description: If โ€œAgeโ€ is text, you canโ€™t calculate an average. Correcting this during conversion ensures functionality.
  4. Answer: Create a โ€œBooksโ€ table (Primary Key: Book ID) and a โ€œBorrowersโ€ table (Primary Key: Borrower ID, Foreign Key: Book ID) to link borrowed books to borrowers.
    Description: This setup tracks which borrower has which book, using Book ID as the foreign key to connect the tables.
  5. Answer: The DBMS rejects the entry or shows an error, as relational integrity requires valid links between tables.
    Description: If a โ€œGradesโ€ table references a โ€œStudent IDโ€ that doesnโ€™t exist in the โ€œStudentsโ€ table, the system flags it to maintain data accuracy.
Spread the love
Ruwan Suraweera Changed status to publish May 22, 2025
You are viewing 1 out of 1 answers, click here to view all answers.
Write your answer.