Database Management System Exercises
Database Management System Exercises
A telephone directory is a database because it functions as a structured collection of related data items - names, addresses, phone numbers - organized for easy retrieval and specific purpose. In contrast, a newspaper is a collection of formatted articles and adverts that do not serve as a structured database .
DBMS offers advantages such as sharing of data among multiple users, reduced data redundancy, prevention of data inconsistency, and enhanced data confidentiality by providing different views for different users .
A form is created for the user to input information, such as new records or new data into a record, whereas a query is created to extract information from that form or initial table .
Data inconsistency arises when there are multiple mismatching copies of the same data. A DBMS helps prevent this by allowing centralized control over data access, ensuring that updates occur uniformly, thereby avoiding discrepancies .
The fields in the Library table are Book_Id, Book Name, Author Name, Price, and Publisher. The Book_Id qualifies as the primary key because it uniquely identifies each book record, ensuring there are no duplicates .
In a network data model, data is organized into a graph model with complex paths, allowing many-to-many relationships. In contrast, a hierarchical data model organizes data into a tree-like structure, where each child record has only one parent, allowing one-to-many relationships .
A database is a collection of logically related data items stored in an organized manner, while data redundancy occurs when the same piece of data exists in multiple places, leading to potential inconsistencies .
An entity in a database is a real-world object about which information is to be stored, such as a person or place. The details related to an entity are described as attributes, representing the data stored for each entity .
The Relational Data Model is known for setting relations between two or more tables. It allows for linking tables through the use of keys, ensuring that data is organized in a way that is consistent and interconnected .
A primary key is a field that uniquely identifies each record in a table. A foreign key, meanwhile, is a field in a table that is the primary key in another table, creating a link between the two tables. For example, Book_Id could be a primary key in a Books table and also appear as a foreign key in a Borrowed_Books table .