0% found this document useful (0 votes)
11 views17 pages

Dbquiz1 3

The document provides an overview of data, its types, and the concept of databases, including their applications and management systems. It explains the roles of database management systems (DBMS), data independence, data abstraction, and various database architectures and models. Additionally, it covers database design life cycle (DDLC), mission statements, user views, and the criteria for selecting a DBMS, along with SQL commands for database operations.

Uploaded by

anonstm68
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)
11 views17 pages

Dbquiz1 3

The document provides an overview of data, its types, and the concept of databases, including their applications and management systems. It explains the roles of database management systems (DBMS), data independence, data abstraction, and various database architectures and models. Additionally, it covers database design life cycle (DDLC), mission statements, user views, and the criteria for selecting a DBMS, along with SQL commands for database operations.

Uploaded by

anonstm68
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
You are on page 1/ 17

Q1.

What is Data
Ans. Data is a collection of raw facts and figures that have no actual meaning until
it is converted to a useful information
For example, Marks of a student of each subject is a data and the total marks
calculated from marks of all subject is an information
Q2. Types of data
There are basically three types of data:
a) Structured Data: Data in a well defined or organized manner such as in
database.
b) Unstructured Data: Data in an unorganized format such as pictures videos
etc
c) Semi Structured Data: Mixture of both. Some data is organized and some
not
Q3. What is a database and its types?
Database is an organized collection of structured information or data that is stored
electronically on a computer device. It is used for the storage, retrieval,
modification or deletion of data
Three types:
a) Relation (data is stored in tables, rows and columns)
b) NoSQL (Data is stored in free style without any relation)
c) Object Oriented (Graph based)
Q4. Applications of database
a) In websites for storing login details of users.
b) In pharmacy to store record of medicine and customers
c) In educational institutes to store records
d) In business to keep record of everything
e) It is almost used in every field
Q5. What is DBMS , its types and function
A database management system is a software that enables access to database and
perform operations of data stored in database such as data creation ,
manipulation , retrieval or deletion
Example is MySQL, MongoDB
There are mainly 7 types of database management system
Relational, Hierarchical, Network, Object Oriented, NoSQL, Graphical, and
Columnar
Q6. Components of DBMS and Architecture of DBMS
Hardware, Software, Data, Procedures and Database access language.
Architecture:
a) Client- Server Model
b) Distributed Databases
Q7. Diff. B/w electronic and file based database
In file based, records are stored physically in files, registers etc whereas In
electronic, data is stored digitally
Q8. Limitations of File based Systems
a) No Security
b) Hard to find a specific record
c) No reliability
d) Data redundancy etc
Q9. History of DBMS
1960: Hierarchical and Network Model
1970: Relational Model
1980: Rise of Commercial Database
1990: NoSQL, cloud based etc
Q10. What is Data independence and its types
Data independence refers to the ability to modify one level of database without
affecting the higher levels
a. Logical Data Independence
Logical data independence allows modifying the conceptual schema without
affecting the external schema. For example. Adding new attribute in a table
should not require changes in the application
b. Physical Data Independence
It allows modifying the physical schema without affecting the conceptual
schema such as re organizing the data or changing the storage where the
database is stored will not affect the conceptual schema
Q11. What is data abstraction and its types
Data abstraction is a process of hiding complex data storage and manipulation
details from end users. Providing a simple view to perform operations on data.
a. View Level
This level presents specific, user defined view of data. Users can access and
manipulate data without needing to know the underlying physical
implementation of data. For example. A customer can see his own tracking
history and not all the records in database.
b. Logical level
This level deals with data structure and relations between them. It deals with
what data is stored , how will it be organized and what is the relation between
the elements.
c. Physical Level
It deals with the physical storage details. Where and how the data is stored in
the storage disk at which location
Q12. What is data organization
Data organization refers to the systematic arrangement of data within the
database, making it easy to access, manageable and useful for various
applications. This process involves classifying data, storing it in structed format
and making efficient retrieval and modification.
Aspects:
Data Structured
Data Classification
Database Design
Data Integrity
Access Control
File organization
Indexes etc.
Q13. What is Data Modeling?
Data modeling in database management system is used to defined structure,
relationships and constraints of data to be stored in the database
Q14. What is Meta data?
Meta data is the data that defines other data. It provides crucial information
about the structure, content and context of data stored in the database making
it easy to understand for end users.
Q15. What is DDL DML and DCL
DDL
DDL stands for data definition language. It is used for defining the structure of
database such as tables, indexes and schemas.
Commands such as Create, Alter, Drop
DML
DML stands for data manipulation language. It is used to manipulate or
manage the data stored in database such as updating records
Commands such as Update, Set, Delete, Insert
DCL
DCL stands for data control language. It controls the access and permissions to
database for every user
Commands such as Grant, Revoke
Q16. What are purposes or objectives of Database?
There are many objectives of database
a. Data storage
Database provides a structured way to store large volume of data. It organizes
data into tables, making it easy to input and retrieve data while ensuring the
data remains consistent, organized and accessible.
b. Data Management
Database provides facility to manage data systematically. This includes
Inserting, Deleting, Updating, and retrieval of data using SQL commands and
queries.
c. Data Integrity and consistency
Database enforces rules (like constraints and datatype) to ensure that only
valid data is stored in database. This reduces data redundancy and ensures
data independence
d. Data security
Database allows administrators to manage who can access and change
information using permissions and roles. It saves sensitive data from being
compromised.
e. Data retrieval
One of the key purposes of database is to find any specific record very quickly
and accurately. The user can find any record even from complex datasets
f. Backup and Recovery
Database has feature to backup the data in case of data loss or corruption.
Ensuring data is safe and can be recovered easily
g. Multi-User access
Modern database allow multiple users to access database without any
complexity or difficulty. Enabling collaboration between different users.
h. Efficiency and scalability
Database provide facility to handle large volume of data efficiently in an
organized way. Enabling to access the data quickly and accurately.
Q16. What are application programs in DBMS
Application programs provide an easy way to interact with the database
without writing SQL queries or commands. It acts like a bridge between user
and the database. The user can perform operations on database such as
inserting, updating, retrieving or deleting record without writing an SQL query
and just by pressing a button
For example:
A student management website that allows teachers to add marks of students
and generate result card without writing any command by theirselves.
Q17. What is a view in database?
A view is a virtual table created in the result of an SQL query. It does not hold
data by itself but provides a way to look at the data from one or more tables.
Its purpose is to simplify complex queries, hide sensitive data by restricting to
only specific information and represented data in a user friendly format.
Example is that a student in LMS will only see his own details. The database
hides details of other students and only shows record of one student.
Q18. What are components for DBMS
a. Hardware Components
i. Server (to host the database)
ii. Storage Device (to store the database in disk)
iii. Network infrastructure (connect multiple users)
b. Software Components
i. DBMS to control the database
ii. Operating system to run the software
c. Data
Data is the main thing that is stored in form of table, rows and columns
d. Users
i. End user (who will use for a specific purpose)
ii. Administrator (who will control all operations)
iii. Database Developer (who will create and manage the database)
Q19. Roles in DBMS
a. Data administrator
Responsible for maintaining data policies, standards, and procedures. It
ensures data governance and data validation and privacy
b. Database administrator
Database administrator manages all database operations. He is responsible
for database installation, management, backup and recovery etc
c. Database designer
Designs the structure of database according to the business needs. It is
responsible for creation of database. Ensuring what data is stored and how
will it be organized and what are the relation between elements. It defines
the schemas for database and manages it
d. Application developer
An application developer creates a software to interact with the database in
an easy way. It allows the user to perform actions in database without
writing any queries
e. End users
End users are the people who use database for a specific reason. It can be
an employee of a company that wants to see his record or a student from a
university
Q20. Types of database modeling
Database modeling is a concept of defining the structure, constraints and
relationships between entities of database. There are four main types of
database modeling
a. ER model
ER model is a conceptual model used to design database in terms of entities
and their relationships
Example: Entities can be student and course, the relationship is between
course and student
b. Relational model
In relational model database, data is stored in the form of tables (rows and
columns) row is called a tuple and column is called an attribute
Example: record of each student in a row and the name, id are attributes in
columns
c. Hierarchical model
In this type of model, data is stored in a tree like structure. A parent can
have many children but children can have only one parent
Example: An organizational chart or a file structure
d. Network model
It is similar to hierarchical model but one child can have multiple parents in
it. It is easier to form a graph like structure
Example: College course registration system (students can take many
courses; courses have many students).
Q21. What is database Architecture?
Database architecture describes the layout and structure of the database system
and how the components are connected to each other. It includes client, server,
database components and can vary from single person use to multi users
a. Teleprocessing Architecture
In teleprocessing architecture, all of the operations are performed on a
central/single computer. The computer itself works as a server and also and a
client. It is simple to implement but it is not much flexible and scalable.
Example: Old banking systems using dumb terminals
b. File based Architecture
In file based architecture, a single file stores the database but all operations are
performed on the client side. It is a little bit better than teleprocessing but not
efficient as modern architectures.
c. Two Tier Architecture
In two tier, the system is converted into two parts. One works as a server that
hosts the database and performs all processing and the second works as a
client that requests and operation
d. Three tier Architecture
In three tier, the system is divided intro three parts
1. Presentation layer: the user interface
2. Application layer: business logic on application
3. Data layer: database server
e. N-tier Architecture
It adds more layers In three tier architecture such as caching, authentication
etc. it is highly scalable, modular and efficient for large enterprise systems
Q22. What are software crises
Software crisis are the errors, difficulties or failures that occur in early days of
software development
There are many causes such as rapid increase in demand, oversized budget,
lack of program structure or miscommunication between user and developer
Q23. What is DDLC
DDLC stands for database design life cycle. It consists of certain steps that are
adapted to create a database efficiently. It is similar to SDLC but some steps are
different.
a. Requirement analysis
Meet the user who wants to create database and gather information about
what data should be stored, how would it be organized and all other needs
that the database should have.
b. Conceptual design
Draw a design of the model using tools like ER diagrams. Focus on entities,
relationships and constraints without worrying about physical implementation.
Draw a complete diagram of the entities, their attributes and relationships.
c. Logical design
Convert the conceptual design into a logical model by created tables, rows,
columns. Define the relationships between the entities and normalize data to
reduce data redundancy and improve data integrity (means data should be
valid)
d. Physical implementation
Now decide how the database will be implemented on database management
systems (MySQL, MongoDB). And decide where the database should be stored
on disk
e. Testing
Now test the database by storing sample values in it to ensure that the
database is working properly and also give a try to the owner of the database
to teach him how to use it.
f. Implementation
Use SQL DDL commands to actually create the structure of database such as
creating tables, attributes, defining constraints and relationships and then
populate the database using DML commands
g. Maintenance
Regularly keep checking the database and find bugs and add new features in it
time to time. Also keep backup of data to recover it in case of data failure or
corruption
Q24. What is mission statement and mission objective
A mission statement is a short statement that explains why the database is
being created, what are the objectives and advantages of creating database for
that purpose
Mission objective refers to specific tasks that a database should support
mainly. For example entering details, retrieving records, updating existing
information etc.
Q25. What is system definition and user views
System definition defines the scope and boundaries of the database system.
How many users are involved and which technologies are used in that system.
User views define how many type of users will be using the database and
setting permissions for each type of user. For example in a school, an admin
can change anything in database but the teachers can only upload marks and
generate mark sheets and students can only view their record but cannot
manipulate it. It is all done by access control
Q26. What is the criteria for selecting a DBMS
a. Data model support (Relation, NoSQL)
b. Scalability and performance
c. Security features
d. Licensing cost (training, purchase, maintenance)
e. User and transaction volume
Q27. What is database application design
It is a process of creating a software application for user interface and
interacting with database without writing SQL commands and queries.
For example. Creating a form to enter details or generating reports etc.
Q28. What is prototyping and implementation
Prototyping is process of creating a working model of the database with limited
functionality to get user feedback and give an overview of how the system will
work. For example. Creating a registration form to show how records will be
added
Implementation is the actual process where the approved design is converted
into actual database. It is done by creating the database, tables, attributes and
setting constraints and data validation.
Q29. What is conversion, testing and maintenance
Conversion is the process of transferring data from an old system to a new or
another system without affecting its structure or format and cleaning the data
to match the new structure. For example. Transferring data of students from
Excel sheet to database
Testing is the process to check the system is working properly or not. It is
important to test a system before implementation to find errors or bugs in it
that can cause conflicts while using the system.
Maintenance refers to keep regularly checking the system for errors or bugs
after implementation, adding new features time to time and ensuring backup
and recovery in case of data loss.
Q30. How would you create a database, table and attributes using SQL
command
CREATE DATABASE SchoolDB;
This command is used to create database. Then
USE SchoolDB;
To select the database. Because there can be multiple databases at a time.
CREATE TABLE Students (
student_id INT PRIMARY KEY,
name VARCHAR (100),
age INT,
gender VARCHAR (10),
email VARCHAR (100),
);
This is the code to create a table with multiple attributes
Q31. How would you delete a table in database
DROP TABLE table_name;
Using Drop to delete the table
Q32. What is entity and entity set
An entity can be anything such as a real world object or a concept of which you
want to store record in database. It can be an employee, student, book, table
anything.
Types of entity
a. Strong entity: an entity that exists independently without depending on
another entity and also has a primary key to uniquely identify itself.
b. Weak entity: an entity that depends on another entity to exist and do not
have a primary key to uniquely identify itself.
An entity set is a collection or group or multiple entities of same type. For
example. all students of a university make an entity set of students.
Q33. Define attributes and their types
An attribute is a property or characteristics of an entity. A single entity can
have multiple attributes. An attribute is also called a column in relational
database.
a. Simple(atomic): cannot be divided into further such as age, salary
b. Composite: can be divided into smaller further values. Name into First
name, and last name
c. Derived: can be derived from another attribute such as age from date of
birth
d. Multivalued: can have multiple values such as phone number
e. Null: attribute does not contain any value
Q34. What are types of keys
a. Primary key
A primary key is an attribute that uniquely identifies an entity in a table. For
example in student table, the roll number can be a primary key.
b. Candidate key
Candidate keys are multiple attributes that uniquely identify an entity
For example: the roll no, email and phone number can also be used as
candidate key
c. Super key
A super key is a combination of multiple candidate keys (attributes) that
uniquely identify an entity in a table.
Q35. What is relationship and its types
A relationship is an association or connection among two or more entities. For
example. A student enrolls in a course
a. One-to-one: One entity in A is related to one in B
b. One-to-many: One entity in A is related to many in B
c. Many-to-one: Many entities in A are related to one in B
d. Many-to-many: Many entities in A are related to many in B
Q36. What is entity role and descriptive attribute
a. In a relationship, each entity plays a role
For example. In teaches relationship, the teacher is the instructor and course
plays the role of subject
b. Descriptive attributes provide information about the relationship
For example. In borrowing relation between student and book, the borrowing
date is a descriptive attribute
Q37. What is ER diagram in EER diagram
Er (entity relation) diagram is used to create a visual representation of the
database to understand the basic concepts, relationships among entities and
constraints to build system efficiently.
An EER (enhanced entity relation) diagram extends the basic ER model by
adding more concepts for better understandings of real world such as
inheritance, classification or constraints.
Q38. Define recursive relationships and structural constraints
Recursive relationship is when an entity is related to itself. For example. In an
employee entity one employee supervises other employees. This supervises
relationship connects the employee to itself
Structural constraints define rules and regulations on relationships.
a. Cardinality: defines who many times an entity can participate in a
relationship.
b. Participation: defines whether the participation of an entity is total
(important) or partial (optional)
Q39. What are problems with ER model
a. Fan trap: if single entity is related to two different entities independently
but the model implies relation among those two that does not exist. For
example. If a department is linked to Employees and Projects. But the
relation between employees and projects is unclear
b. Chasm trap: Occurs when a relationship among two entities Is missing
leading to incomplete data retrieval. For example. If a course is linked to
student and instructor but there is no relation between student and
instructor.
Q40. Define Specialization/Generalization and attribute inheritance
a. Generalization: Combining lower level multiple entities into higher level
entity. (e.g, car, truck > vehicle)
b. Specialization: Dividing high level entity into subtype entites
(e.g, Employee > manager, clerk)
c. Attribute inheritance: Assigning values to subtype entity from supertype
entity
Q41. What is aggregation and composition
Aggregation is a “has a” or “uses” relationship between relationships
for example. A relation between patient, doctor and hospital
Doctor treats the patient
Hospital records the treatment
Composition is a strong form of aggregation where one entity is completely
dependent on another entity
Such as House and rooms, a room cannot exist without a house
Q42. How to draw an ER diagram
Follow these steps to create an ER diagram
1. Identify entities
Entities can be any object. Use this shape for an entity
2. Identify attributes:
Each entity can have many attributes.
3. Identify relationships
Think which entities will relate to each other
4. Add cardinality
Define how many instances of one entity relate to another
5. Define participation
Show that the entity will be total (mandatory) or partial (optional)
6. Use special notations:
Double rectangle for weak entities
Double diamonds for identifying relationship
Use a triangle to connect supertype and subtype

You might also like