0% found this document useful (0 votes)
12 views28 pages

Use Simple Language

The document discusses key concepts in database management systems (DBMS), including the significance of physical data independence, the roles of a Database Administrator (DBA), and the architecture of DBMS. It explains the differences between various data models, keys, and commands, as well as the importance of data abstraction and independence. Additionally, it highlights the advantages of using a DBMS over traditional file systems.

Uploaded by

Raunak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

Use Simple Language

The document discusses key concepts in database management systems (DBMS), including the significance of physical data independence, the roles of a Database Administrator (DBA), and the architecture of DBMS. It explains the differences between various data models, keys, and commands, as well as the importance of data abstraction and independence. Additionally, it highlights the advantages of using a DBMS over traditional file systems.

Uploaded by

Raunak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

​1. What is the significance of Physical Data Independence?

​ hysical Data Independence is important because it lets you change how the data is​
P
​physically stored without having to change the main design of the database​​1​.​ For example, if​
​you change the storage size of the database server, the main structure of the database​
​doesn't get affected​​2​​. This makes it easier to manage​​and update the database system.​

​2. List the four functions of DBA.​

​ Database Administrator (DBA) is the person who is in charge of everything in the database​
A
​system​​3​.​ Here are four of their main jobs:​

​●​ ​Defining the schema​​: Deciding how the database is​​structured​​4​.​ ​

​●​ ​Defining storage​​: Deciding how and where the data​​is stored​​5​.​ ​

​●​ ​Granting access​​: Giving users permission to use the​​database​​6​​.​

​●​ S
​ etting rules​​: Making sure the data is accurate and​​consistent by specifying integrity​
​constraints​​7​​.​

​ . Draw the overall structure of DBMS and explain its various​


3
​components.​

​The document shows a drawing of the overall DBMS structure​​8​​.​

​Here are its main parts explained simply:​


​●​ ​Users​​: Different people who use the database in different​​ways​​9​.​ This includes regular​
​users, programmers, and the database administrator (DBA)​​10101010​​.​

​●​ Q
​ uery Processor​​: This part understands what the user​​wants from the database and​
​makes a plan to get it​​11111111​​. It includes:​

​○​ ​DDL Interpreter​​: Reads commands that define the database​​structure​​12​​.​

​○​ D
​ ML Compiler​​: Translates requests for data into simple​​instructions that the system​
​can execute​​13​​.​

​○​ ​Query Evaluation Engine​​: Follows the simple instructions​​to get the actual data​​14​​.​

​●​ S
​ torage Manager​​: This is the part that handles the​​actual saving and retrieving of data​
​from the disk​​15​​. It makes sure data is stored, updated,​​and read efficiently​​16​​.​

​●​ D
​ isk Storage​​: This is the physical place where everything​​is stored, including the data​
​itself, information about the data (the data dictionary), and indexes to find data​
​quickly​​17171717​​.​

​4. Write the difference between DDL and DML.​

​●​ D
​ DL (Data Definition Language)​​is used to​​create and​​design​​the database​
​structure​​18​​. Think of it as the blueprint for building​​the database tables.​

​●​ D
​ ML (Data Manipulation Language)​​is used to​​work with​​the data​​inside the​
​database​​19​​. This includes adding, changing, deleting,​​or reading data.​

​5. Define candidate key and super key with example.​

​●​ S
​ uper Key​​: A super key is any set of one or more columns​​that can uniquely find any​
​single row in a table​​20​​.​

​●​ ​Candidate Key​​: A candidate key is a​​minimal​​super​​key​​21​​. This means it's a super key​
​with no extra, unneeded columns. A table can have several candidate keys​​22​​.​
​○​ E
​ xample​​: In a​​customer​​table, the​​customer-id​​column​​is a candidate key because it​
​can uniquely identify each customer​​23​​. In an​

​account​​table, the​​account-number​​is a candidate key​​24​​.​

​6. Differentiate TRUNCATE and DELETE command.​

​The provided document does not explain the TRUNCATE or DELETE commands.​

​7. What is the difference between DROP and DELETE command?​

​The provided document does not explain the DROP or DELETE commands.​

​8. What are the different types of Data Models in DBMS? Explain them.​

​ data model is a set of tools used to describe how data is structured and related​​25252525​​. The​
A
​main types are:​

​●​ O
​ bject-Based Models​​: These describe data using objects​​and their relationships.​
​○​ ​Entity-Relationship (E-R) Model​​: This is a popular​​model for database design that​
​uses entities (things like a​​customer​​or​​product​​)​​and shows the relationships​
​between them​​262626262626262626​​.​

​●​ R
​ ecord-Based Models​​: These models are based on records.​
​○​ ​Relational Model​​: This is the most common model. It​​organizes data into tables with​
​rows and columns​​27272727​​.​

​○​ N
​ etwork Model​​: This model connects records in a graph-like​​structure, where a​
​record can have many "parent" and "child" records​​28282828​​.​

​○​ H
​ ierarchical Model​​: This model organizes data in a tree-like structure, like a family​
​tree, with parent and child records​​29​​.​
​ . State the procedural DML and non procedural DML with their​
9
​differences.​

​●​ P
​ rocedural DML​​: The user tells the system​​what data​​they want​​and also​​how to get it​
​step-by-step​​30303030​​.​

​●​ N
​ onprocedural DML​​: The user only tells the system​​what data they want​​, but not how​
​to get it​​31​​.​

​ he main difference is that procedural DML requires you to give detailed instructions, while​
T
​nonprocedural DML lets the database figure out the best way to get the data for you​​32​​. SQL is​
​the most common nonprocedural language​​33​​.​

1​ 0. What is ER Diagram? Explain different Components of an ER​


​Diagram with their Notation. Also make an ER Diagram for Employee​
​Project Management System.​

​An​

​E-R Diagram​​is like a blueprint for a database​​34​​.​​It's a drawing that shows the different pieces​
​of information in a system and how they are connected​​35​​.​

​The main parts (components) and their symbols (notations) are:​


​●​ ​Entity Set​​: A real-world object or concept, like a​​person​​or a​​car​​36​​. A group of the same​
​type of entities is an entity set​​37​​.​

​○​ ​Symbol​​: A rectangle​​38​​. A double rectangle is used​​for a "weak" entity, which depends​
​on another entity​​39​​.​

​●​ ​Attribute​​: A property that describes an entity, like​​the​​name​​of a person or the​​color​​of a​


​car​​40​​.​

​○​ ​Symbol​​: An oval (ellipse)​​41​​. A double oval means it​​can have multiple values (like​
​phone numbers)​​42​​.​

​●​ R
​ elationship Set​​: Shows how two or more entities are​​connected or related to each​
​other​​43​​.​

​○​ ​Symbol​​: A diamond​​44​​.​

​ he document you provided does not have an E-R Diagram for an "Employee Project​
T
​Management System."​

1​ 1. What is Data Abstraction? How the Data Abstraction is achieved in​


​DBMS?​

​ ata Abstraction means hiding the complicated details of how data is stored, so users only​
D
​see a simple view of it​​45​​.​

​This is done in three levels:​


​1.​ P
​ hysical Level​​: The lowest level. It describes​
​how the data is actually stored​​on the computer's​​disks​​46​​. Users don't see this.​

​2.​ L
​ ogical Level​​: The middle level. It describes​
​what data is stored​​and what relationships exist between​​the data, like a​​customer​​table​
​with​​name​​and​​city​​columns​​47​​.​

​3.​ V
​ iew Level​​: The highest level. It shows​
​only a part of the database​​that is relevant to a​​specific user​​48​​. For example, a bank​
​teller might see a customer's account balance but not their salary​​49​​.​

1​ 2. List any four disadvantages of file system approach over database​


​approach.​
​ sing regular files to store data has several problems compared to using a DBMS​​50​​. Here are​
U
​four:​

​1.​ D
​ ata Redundancy and Inconsistency​​: The same information​​can be saved in multiple​
​different files, which can lead to errors if it's updated in one place but not another​​51​​.​

​2.​ D
​ ifficulty in Accessing Data​​: To get information,​​you often need to write a new​
​computer program for each new task​​52​​.​

​3.​ I​ ntegrity Problems​​: Rules about the data (like an​​account balance must be greater than​
​zero) are hard to enforce because they are hidden inside the program code​​53535353​​.​

​4.​ P
​ roblem with Multiple Users​​: If multiple users try​​to access and update the same file at​
​the same time, it can lead to inconsistent data​​54545454​​.​

​13. Differentiate between physical and logical data independence.​

​Feature​ ​Logical Data Independence​ ​ hysical Data​


P
​Independence​

​What It Is​ ​ he ability to change the​


T ​ he ability to change how​
T
​main database design​ ​data is physically stored​
​without affecting the user's​ ​without affecting the main​
​view or application​ ​database design​​56​​.​
​programs​​55​​.​

​Levels It Separates​ ​ eparates the user's view​


S ​ eparates the main​
S
​from the main (conceptual)​ ​(conceptual) database​
​database design​​57​​.​ ​design from the physical​
​storage​​58​​.​

​Example​ ​ ou can add a new column​


Y ​ ou can move the database​
Y
​to a table without breaking​ ​to a new, faster hard drive​
​ xisting programs that​
e t​ o improve performance,​
​don't use that column​​59​​.​ ​and the main design of the​
​database stays the same​​60​​.​

1​ 4. Illustrate the concept of data independence and its type with​


​example. Why is it required?​

​ ata independence​​means you can change one part of​​the database without having to​
D
​change other parts​​61​​. It is needed so that "changes​​in some parts do not seriously influence​
​others"​​62​​. This makes the database system much more​​flexible.​

​There are two types:​


​1.​ P
​ hysical Data Independence​​: Lets you change the physical​​storage of data without​
​affecting the main database structure​​63​​.​

​○​ E
​ xample​​: The DBA can change how data is stored on​​disk to make the system faster.​
​Thanks to physical data independence, this change won't require anyone to rewrite​
​their application programs​​64​​.​

​2.​ L
​ ogical Data Independence​​: Lets you change the main​​database structure without​
​forcing you to rewrite user application programs​​65​​.​

​○​ E
​ xample​​: You can add a new attribute (like an email​​address) to the customer table.​
​Any existing programs that don't need the email address will continue to work​
​without any changes​​66​​.​

1​ 5. Explain the architecture of DBMS in terms of its components with a​


​proper diagram.​

​The architecture of a DBMS explains how its different parts are connected, usually in a​
​client-server setup​​67​​.​

​1.​ 1​ -Tier Architecture​​: The simplest setup where the​​database and the application are on​
​the same machine​​68​​.​

​2.​ ​2-Tier Architecture​​: This is a basic client-server​​setup​​69​​.​

​○​ ​Client​​: Your computer, which runs the application​​70​​.​

​○​ ​Server​​: A powerful computer where the database is​​stored and managed​​71​​. The​
​client application talks directly to the server​​72​​.​

​3.​ ​3-Tier Architecture​​: This adds a middle layer for​​more complex applications​​73​​.​

​○​ ​Client​​: Your computer, which just shows the user interface​​74​​.​

​○​ A
​ pplication Server (Middle Tier)​​: The client talks​​to this middle layer, which​
​contains the business logic and handles tasks​​75​​.​

​○​ D
​ atabase Server​​: The application server talks to the​​database server to get or store​
​data​​76​​.​

1​ 6. What are the different types of Data Models in DBMS? Explain​


​them.​

​This question is the same as question 8. Please see the answer for question 8.​

​17. Define candidate key, super key, primary key and foreign key.​

​●​ S
​ uper Key​​: A set of one or more columns that can be​​used to uniquely identify any row in​
​a table​​77​​.​

​●​ C
​ andidate Key​​: A minimal super key. It's a column​​or set of columns that can uniquely​
​identify a row, with no extra columns​​78​​.​
​●​ ​Primary Key​​: The one candidate key that is chosen​​to be the main identifier for a table​​79​​.​
​It cannot have any empty (null) values​​80​​.​

​ oreign Key​​: A column in one table that points to​​the primary key in another table​​81​​. It's​
​●​ F
​used to link two tables together.​

​18. What is strong and weak entity set explain with example?​

​●​ S
​ trong Entity Set​​: This is a regular entity set that​​has its own primary key to uniquely​
​identify its members​​82​​. For example, a​

​ ustomer entity with a customer-id is a strong entity. It is shown with a single rectangle in​
c
​an E-R diagram​​83​​.​

​●​ W
​ eak Entity Set​​: This is an entity set that cannot​​be uniquely identified by its own​
​attributes alone​​84​​. It depends on a strong entity​​set (called the owner) to be identified.​

​○​ E
​ xample​​: A payment entity for a loan. A payment only​​makes sense in the context of​
​a specific loan. Its full key would be the​
​loan_number​​(from the strong entity​​loan​​) plus its​​own​​payment_number​​85​​. It is​
​shown with a double rectangle in an E-R diagram​​86​​.​

​19. Discuss DDL and DML command.​

​The document discusses DDL and DML as types of languages, not specific commands.​
​●​ D
​ DL (Data Definition Language)​​: This language is used​​to​​define​​the database​
​structure​​87​​. You use it to create tables and define​​what columns they have. The DDL​
​compiler saves these definitions in the data dictionary​​88​​.​

​●​ D
​ ML (Data Manipulation Language)​​: This language is​​used to​​manage​​the data inside​
​the tables​​89​​. It lets users add, update, delete, and​​retrieve data.​
​20. Discuss the role of database administrator.​

​The​

​ atabase Administrator (DBA)​​is the person in charge​​of managing the entire database​
D
​system​​90​​. Their main roles are:​

​●​ ​To define the database structure (schema)​​91​​.​

​●​ ​To decide how the data is stored and accessed​​92​​.​

​●​ ​To make changes to the database structure when needed​​93​​.​

​●​ ​To give users permission to access the database​​94​​.​

​●​ ​To set rules (integrity constraints) to keep the data accurate​​95​​.​

​●​ ​To talk with users and help with their needs​​96​​.​

​●​ ​To monitor how well the database is performing and make improvements​​97​​.​

​21. Give example for one to one and one to many relationship.​

​The document uses a customer and a loan to show relationships.​


​●​ O
​ ne-to-One Relationship​​: This means one customer can​​have at most one loan, and​
​one loan can belong to at most one customer​​98​​. This​​is shown with an arrow pointing​
​from the relationship diamond to each entity​​99​​.​

​●​ O
​ ne-to-Many Relationship​​: This means one loan can​​belong to at most one customer,​
​but one customer can have many loans​​100​​. This is shown​​with an arrow pointing to the​
​"one" side (​

​loan​​) and a simple line to the "many" side (​​customer​​)​1​01​​.​


​ 2. Describe the three-schema architecture. Why do we need​
2
​mappings between schema levels? How do different schema​
​definition languages support this architecture?​

​ he three-schema architecture is another name for the three levels of data abstraction that​
T
​separate how users see the data from how it's actually stored​​102​​. The three schemas (or​
​levels) are:​

​1.​ ​Physical Schema​​: The design for how data is physically​​stored on disk​​103​​.​

​2.​ L
​ ogical Schema​​: The main design for the entire database,​​showing what data is stored​
​and how it's related​​104​​.​

​3.​ ​View Schema​​: A design for a particular part of the​​database that a specific user sees​​105​​.​

​We need mappings between these levels to create​

​ ata independence​​106​​. This means we can change a lower​​level (like how data is stored)​
d
​without affecting the higher levels (like what the user sees).​

​The document says that a​

​ ata Definition Language (DDL)​​is used to define the​​database schema​​107​​, but it doesn't​
D
​explain in detail how different languages are used for each specific level.​

​ 3. Explain the following with example (i) Generalization (ii)​


2
​Specialization (iii) Aggregation.​

​●​ (​ i) Generalization​​: This is a​​bottom-up​​process. You​​take several specific entity sets that​
​have common features and combine them into a single, more general one​​108108108108​​. For​
​example, you could take​

​officer​​,​​teller​​, and​​secretary​​and generalize them into a single​​employee​​entity​​109​​.​


​●​ (​ ii) Specialization​​: This is a​​top-down​​process. You​​take a general entity set and break it​
​down into more specific subgroups​​110​​. For example,​​you can take a general​

​person​​entity and specialize it into​​employee​​and​​customer​​subgroups​​111​​. The subgroups​


​inherit the properties of the general entity​​112​​. This​​is shown with an​

​ISA​​triangle in diagrams​​113​​.​

​●​ (​ iii) Aggregation​​: This is when you treat a relationship​​between entities as a single entity​
​itself​​114​​. This lets you create relationships involving​​other relationships.​

​○​ E
​ xample​​: An employee works_on a job at a branch. If​​you want to say that a​
​manager​​manages this entire activity, you can use​​aggregation to bundle the​
​works_on​​relationship into a single thing that the​​manager​​can manage​​115​​.​

​ 4. Draw an ER diagram of Hospital or Bank with showing the​


2
​Specialization, Aggregation, and Generalization. Also convert it in to​
​relational schemas and SQL DDL.​

​The document has a large E-R diagram for a bank on page 34​​116​​.​

​●​ T
​ his diagram shows​​Specialization/Generalization​​.​​The​
​account​​entity is specialized into a​​savings-account​​and a​
​checking-account​​117117117117117117117117117​​.​

​●​ H
​ owever, this specific bank diagram does not show​​Aggregation​​. A separate example for​
​aggregation is shown on page 29​​118​​.​

​The document explains how to convert E-R diagrams into tables (relational schemas)​​119119119119​​.​
​For example, each entity set becomes its own table​​120​​.​

​ owever, the document does not provide the full set of tables or the SQL DDL commands for​
H
​the bank diagram.​
​ 5. A database is being constructed to keep track of the teams and​
2
​games of a sport league... (i) Design an E-R schema diagram for this​
​application. (ii) Map the E-R diagram into relational model.​

​ he document you provided does not contain any information, diagrams, or models for a​
T
​sports league database. Therefore, this question cannot be answered.​

​ 6. Explain the process of reducing an ER diagram to tables. Provide a​


2
​simple example.​

​ he process of turning an E-R diagram into tables is the first step in creating a relational​
T
​database​​121​​. Here's how it generally works:​

​1.​ C
​ reate a Table for Each Set​​: You create a unique table​​for each entity set and for each​
​relationship set in the diagram​​122​​.​

​2.​ A
​ dd Columns for Attributes​​: The columns of each table​​will be the attributes of that​
​entity or relationship​​123​​.​

​3.​ H
​ andling Entity Sets​​:​
​○​ ​A​
​strong entity set​​becomes a table with its attributes​​124​​.​

​○​ A
​​
​weak entity set​​becomes a table that includes columns​​for its own attributes plus​
​the primary key of the strong entity it depends on​​125​​.​

​4.​ H
​ andling Relationship Sets​​:​
​○​ ​A​​many-to-many​​relationship becomes its own table.​​This table includes the primary​
​keys from the two entities it connects​​126​​.​

​○​ F
​ or​​many-to-one​​relationships, instead of creating​​a new table, you can just add a​
​new column (a foreign key) to the table on the "many" side. This new column will hold​
​the primary key of the entity on the "one" side​​127​​.​
​ he second part of your question asks to convert a specific university database example. The​
T
​document you provided does not contain this example, so it cannot be converted.​

You might also like