DBMS
DBMS
File structure:-
File structure refers to the way data is arranged within a file. This arrangement can
vary depending on the file type, but it typically involves a combination of headers,
metadata, and data content.
• Text Files: Typically organized as a sequence of lines, each ending with a
newline character.
• Database Files: Often have a structured format, such as a relational database
that stores data in tables with rows and columns.
File organization:-
File Structure refers to the way files are arranged on a storage device. This
organization is often hierarchical, with files grouped into directories (or folders).
• Hierarchical Structure: Files are organized in a tree-like structure, with
directories containing other directories and files. This allows for efficient
organization and navigation of large collections of files.
• Flat Structure: Files are stored in a single directory without any subdirectories.
While simpler to manage, this can become cumbersome for large collections
of files.
Characteristics of Databases
A database is a structured collection of data. Here are some key characteristics:
1. Organization:
• Structured Data: Data is organized in a systematic manner, often using tables,
rows, and columns.
• Relationships: Data can be related to each other through defined
relationships, such as one-to-one, one-to-many, or many-to-many.
2. Consistency:
• Data Integrity: Databases maintain data integrity, ensuring that data is
accurate, consistent, and free from errors.
• Data Validation: Rules and constraints can be applied to validate data,
preventing invalid or inconsistent entries.
3. Efficiency:
• Fast Access: Databases are designed to provide efficient access to data,
allowing users to retrieve information quickly.
• Indexing: Indexes can be created to speed up data retrieval by organizing data
in a specific way.
4. Security:
• Access Control: Databases implement access control mechanisms to protect
data from unauthorized access.
• Encryption: Sensitive data can be encrypted to ensure confidentiality.
5. Reliability:
• Backup and Recovery: Databases often have built-in backup and recovery
mechanisms to protect data from loss or corruption.
• Redundancy: Data can be replicated to ensure availability in case of failures.
6. Scalability:
• Growth: Databases can be scaled to accommodate increasing amounts of data
and users.
• Performance: Scalability ensures that the database can maintain performance
as it grows.
7. Data Independence:
• Logical and Physical Independence: Data independence allows changes to the
physical storage of data without affecting the logical view of the data.
8. Concurrency:
• Multiple Users: Databases support concurrent access, allowing multiple users
to access and modify data simultaneously.
• Concurrency Control: Mechanisms are in place to prevent conflicts and ensure
data consistency.
Advantages of DBMS:-
o Controls database redundancy: It can control data redundancy because it
stores all the data in one single database file and that recorded data is placed
in the database.
o Data sharing: In DBMS, the authorized users of an organization can share the
data among multiple users.
o Easily Maintenance: It can be easily maintainable due to the centralized
nature of the database system.
o Reduce time: It reduces development time and maintenance need.
o Backup: It provides backup and recovery subsystems which create automatic
backup of data from hardware and software failures and restores the data if
required.
o multiple user interface: It provides different types of user interfaces like
graphical user interfaces, application program interfaces
Disadvantages of DBMS:-
o Cost of Hardware and Software: It requires a high speed of data processor
and large memory size to run DBMS software.
o Size: It occupies a large space of disks and large memory to run them
efficiently.
o Complexity: Database system creates additional complexity and requirements.
o Higher impact of failure: Failure is highly impacted the database because in
most of the organization, all the data stored in a single database and if the
database is damaged due to electric failure or database corruption then the
data may be lost forever.