0% found this document useful (0 votes)
27 views13 pages

4 Multimedia-Database

A multimedia database (MMDB) is designed to store and manage various types of multimedia data, including text, images, audio, and video, enabling efficient retrieval and integration of this information. Multimedia Database Management Systems (MMDBMS) support the creation, storage, and querying of multimedia data while addressing requirements such as data independence, concurrency control, and privacy. The document also discusses the challenges of implementing multimedia databases, their applications in various fields, and the importance of effective data representation and management.

Uploaded by

Noor Alamin 99
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)
27 views13 pages

4 Multimedia-Database

A multimedia database (MMDB) is designed to store and manage various types of multimedia data, including text, images, audio, and video, enabling efficient retrieval and integration of this information. Multimedia Database Management Systems (MMDBMS) support the creation, storage, and querying of multimedia data while addressing requirements such as data independence, concurrency control, and privacy. The document also discusses the challenges of implementing multimedia databases, their applications in various fields, and the importance of effective data representation and management.

Uploaded by

Noor Alamin 99
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/ 13

Introduction: To store pictures, videos, and sounds that people use for learning, fun,

health, and advertising. We need a multimedia database. A multimedia database has all kinds of
information, like words, pictures, sounds, and videos. It keeps track of all this information and
finds data easily. These databases enable the storage and retrieval of multimedia data components.
All media files in these databases are stored as binary strings and encoded according to their file
types. Let's explore the various types of multimedia databases.

A Multimedia database (MMDB) is a collection of related for multimedia data. The


multimedia data include one or more primary media data types such as text, images,
graphic objects (including drawings, sketches and illustrations) animation sequences, audio
and video.

A Multimedia Database Management System (MMDBMS) is a framework that


manages different types of data potentially represented in a wide diversity of formats on a
wide array of media sources. It provides support for multimedia data types, and facilitate
for creation, storage, access, query and control of a multimedia database.

Multimedia database is the collection of interrelated multimedia data that includes text,
graphics (sketches, drawings), images, animations, video, audio etc and have vast amounts
of multisource multimedia data. The framework that manages different types of multimedia
data which can be stored, delivered and utilized in different ways is known as multimedia
database management system.

Multimedia Database
It is a special type of Database capable of storing and managing multimedia information,
such as audio, video, images, etc, along with traditional text-based data. Following are
some examples of database management systems that support multimedia data:-
1. MongoDB GridFS
2. MySQL
3. PostgreSQL
4. IBM DB2 Content Manager
5. Oracle Multimedia
6. Microsoft SQL Server etc.

It depends on you to choose an appropriate database management system depending on the


use case and scalability requirements. Most modern databases can handle non-textual
multimedia data with or without additional setup.

Multimedia Data Representation:


We can represent multimedia in forms of text, images, audio, and video. Text is the most
basic and widely used form of multimedia data. Images are used to represent visual data.
Audio and video are used for representing sound and motion, respectively. Main advantage
is that it provides a richer and more engaging user experience. But it requires more storage
space than text data.

The multimedia database is classified into three types based on the type of multimedia data
it stores −

Static media

This is designed for static media objects. These media objects are not time-dependent, such
as images and graphic objects.

Dynamic media

This is used for storing dynamic forms of media content that are time-dependent. These
media objects are audio data, video data, and animations.

Dimensional media

These multimedia datasets are primarily used in Computer-Aided Drafting (CAD)


programs and operate on 3D multimedia data. They encompass various formats used by
image and video editing applications.

Comparison of multimedia data types


Medium Elements Time-dependence

Graphic Vectors, regions No

Image Pixels No

Audio Sound, Volume Yes

Video Raster images, graphics Yes

Requirements of Multimedia databases


Like the traditional databases, Multimedia databases should address the following
requirements:
 Integration
o Data items do not need to be duplicated for different programs invocations
 Data independence
o Separate the database and the management from the application programs
 Concurrency control
o Allows concurrent transactions
 Persistence
o Data objects can be saved and re-used by different transactions and
program invocations
 Privacy
o Access and authorization control
 Integrity control
o Ensures database consistency between transactions
 Recovery
o Failures of transactions should not affect the persistent data storage
 Query support
o Allows easy querying of multimedia data

Multimedia databases should have the ability to uniformly query data (media data, textual
data) represented in different formats and have the ability to simultaneously query different
media sources and conduct classical database operations across them. (Query support)

They should have the ability to retrieve media objects from a local storage device in a good
manner. (Storage support)

They should have the ability to take the response generated by a query and develop a
presentation of that response in terms of audio-visual media and have the ability to deliver
this presentation. (Presentation and delivery support)

Database integration combines data from diverse sources to create a consolidated version.
These sources include databases, the cloud, data warehouses, virtual databases, files, and
more. Database integration makes data accessible to multiple stakeholders and client
applications without reducing data quality.

Let’s understand this concept using an example. For instance, a company stores its
accounting data in the Oracle database and customer data in Salesforce. By utilizing the
DB integration processes, employees can access the combined data of both systems in one
place.

Data independence in DBMS refers to the capacity to change the schema (structure) of
the database without affecting the application programs or user views that access the data.
It is a fundamental concept that simplifies database maintenance and enhances flexibility.

Data persistence an application creates data. Then, that application quits. What happens
to the data? This is where data persistence comes into play. Data persistence is the
longevity of data after the application that created it has been closed. In order for this to
happen, the data must be written to non-volatile storage — a type of memory that can retain
that information long-term, even if the application is no longer running.

Concurrently control is a very important concept of DBMS which ensures the


simultaneous execution or manipulation of data by several processes or user without
resulting in data inconsistency. Concurrency Control deals with interleaved execution of
more than one transaction.

In information technology and computer science, especially in the fields of computer


programming, operating systems, multiprocessors, and databases, concurrency control
ensures that correct results for concurrent operations are generated, while getting those
results as quickly as possible.
A set of logically related operations is known as a transaction. The main operations of a
transaction are:

 Read(A): Read operations Read(A) or R(A) reads the value of A from the database
and stores it in a buffer in the main memory.
 Write (A): Write operation Write(A) or W(A) writes the value back to the database
from the buffer.

(Note: It doesn’t always need to write it to a database back it just writes the changes to
buffer this is the reason where dirty read comes into the picture)

Let us take a debit transaction from an account that consists of the following operations:

1. R(A);
2. A=A-1000;
3. W(A);

Assume A’s value before starting the transaction is 5000.

 The first operation reads the value of A from the database and stores it in a buffer.
 the Second operation will decrease its value by 1000. So buffer will contain 4000.
 the Third operation will write the value from the buffer to the database. So A’s final
value will be 4000.

But it may also be possible that the transaction may fail after executing some of its
operations. The failure can be because of hardware, software or power, etc. For
example, if the debit transaction discussed above fails after executing operation 2, the value
of A will remain 5000 in the database which is not acceptable by the bank. To avoid this,
Database has two important operations:

 Commit: After all instructions of a transaction are successfully executed, the


changes made by a transaction are made permanent in the database.
 Rollback: If a transaction is not able to execute all operations successfully, all the
changes made by a transaction are undone.

Content of Multimedia Database


The contents of the multimedia database has additional information related to the primary
multimedia data. To effectively manage and query a vast collection of multimedia data.
These contents are −

Media data

It is actual multimedia data or primary data stored in the multimedia database. It represents
a multimedia object. It can be an image, audio, video, animation, graphic object, or text.

Media format data

It is information related to the format of the multimedia data such as frame rates and
encoding schemes.

Media keyword data

It is also known as content descriptive data. This information pertains to the generation of
multimedia data, such as date and time in the case of images and videos.
Media feature data

This data is used to describe the characteristics of multimedia data, such as the color
distribution.

Challenges of Multimedia Database


There are many challenges to implement a multimedia database. Some of these are:

 Multimedia databases contains data in a large type of formats such as .txt(text),


.jpg(images), .swf(videos), .mp3(audio) etc. It is difficult to convert one type of data
format to another.
 The multimedia database requires a large size as the multimedia data is quite large
and needs to be stored successfully in the database.
 It takes a lot of time to process multimedia data so multimedia database is slow.

Issues and challenges


 Multimedia data consists of a variety of media formats or file representations
including TIFF, BMP, PPT, IVUE, FPX, JPEG, MPEG, AVI, MID, WAV, DOC,
GIF, EPS, PNG, etc. Because of restrictions on the conversion from one format to
the other, the use of the data in a specific format has been limited as well. Usually,
the data size of multimedia is large such as video; therefore, multimedia data often
require a large storage.
 Multimedia database consume a lot of processing time, as well as bandwidth.
 Some multimedia data types such as video, audio, and animation sequences have
temporal requirements that have implications on their storage, manipulation and
presentation, but images, video and graphics data have special constraints in terms
of their content.

Challenges of Multimedia Database


Implementing a multimedia database has various challenges that need to be addressed.
These challenges include −

Storage

Multimedia data is typically large in size. It affects its storage, retrieval, and transmission.
So, it requires specialized storage facilities that are larger and faster than conventional disk
storage.

Modeling

Multimedia data exists in various formats. It can be challenging to convert one form of
media content into another. This difficulty impacts the multimedia data retrieval process.

Performance

Due to its massive size and storage requirements. It takes a considerable amount of time to
process different types of multimedia data. Multimedia databases are slower than
traditional databases. It requires large bandwidth and high processing power.

Querying

Content-based searching of multimedia content has computer vision techniques to retrieve


digital multimedia data from a vast database. This process is difficult to implement. So, it
is not conveniently supported by traditional relational databases.
Applications of Multimedia Database
These are various applications of multimedia database

Documents and record management

Multimedia databases are used in industries that require a large set of documentation and
records, such as the insurance claim industry.

Education

Multimedia data provides an interactive way to represent data. It makes multimedia


databases effective knowledge dissemination tools. Examples are multimedia datasets in
digital libraries and computer-aided learning software.

Marketing and Entertainment

Multimedia databases act as data providers for entertainment applications like video-on-
demand apps and news-on-demand apps. They can provide multimedia data for
advertisements and digital marketing processes.

Real-time Monitoring

When combined with various software tools, multimedia databases can be used to monitor
and manage multimedia data in real-time. For example, a geographic information system
(GIS) makes use of multimedia databases to analyze and visualize geographical multimedia
data in real-time.

Areas where multimedia database is applied are :


 Documents and record management: Industries and businesses that keep detailed
records and variety of documents. Example: Insurance claim record.
 Knowledge dissemination: Multimedia database is a very effective tool for
knowledge dissemination in terms of providing several resources. Example:
Electronic books.
 Education and training: Computer-aided learning materials can be designed using
multimedia sources which are nowadays very popular sources of learning. Example:
Digital libraries.
 Marketing, advertising, retailing, entertainment and travel. Example: a virtual tour
of cities.
 Real-time control and monitoring: Coupled with active database technology,
multimedia presentation of information can be very effective means for monitoring
and controlling complex tasks Example: Manufacturing operation control.

Application areas
Examples of multimedia database application areas:

 Digital Libraries
 News-on-Demand
 Video-on-Demand
 Music database
 Geographic Information Systems (GIS)
 Telemedicine
Video-on-demand (VOD), technology for delivering video content, such as movies and
television shows, directly to individual customers for immediate viewing.

In a cable television VOD system, video content is stored on a centralized server in the
form of compressed digital files. A customer navigates a programming menu via the cable
set-top box and makes a selection, available either at no cost or for a charge. The server
immediately begins streaming the program. The viewer may pause, fast-forward, rewind,
or stop and later resume the program. Sometimes the program will be available for viewing
only for a short set time period. VOD systems may also use a download-based model, in
which the program is stored on a hard disk in the set-top box, or they may transmit over
the Internet to a personal computer.

Telehealth is the distribution of health-related services and information via electronic


information and telecommunication technologies. It allows long-distance patient and
clinician contact, care, advice, reminders, education, intervention, monitoring, and remote
admissions. Telemedicine is sometimes used as a synonym, or is used in a more limited
sense to describe remote clinical services, such as diagnosis and monitoring. When rural
settings, lack of transport, a lack of mobility, conditions due to outbreaks, epidemics or
pandemics, decreased funding, or a lack of staff restrict access to care, telehealth may
bridge the gap as well as provide distance-learning; meetings, supervision, and
presentations between practitioners; online information and health data management and
healthcare system integration. Telehealth could include two clinicians discussing a case
over video conference; a robotic surgery occurring through remote access; physical therapy
done via digital monitoring instruments, live feed and application combinations; tests being
forwarded between facilities for interpretation by a higher specialist; home monitoring
through continuous sending of patient health data; client to practitioner online conference;
or even videophone interpretation during a consult.

GIS, or geographic information systems, are computer-based tools used to store,


visualize, analyze, and interpret geographic data. Geographic data (also called spatial, or
geospatial data) identifies the geographic location of features.

These data include anything that can be associated with a location on the globe, or more
simply anything that can be mapped. For example, roads, country boundaries, and address
are all types of spatial data. At the CDC, we use GIS to help answer questions about how
location impacts disease and disability.

A digital library is a collection of digital objects, such as books, magazines, audio


recordings, video recordings and other documents that are accessible electronically.

Digital libraries provide users with online access to a wide range of resources. They are
often used by students for research or by professionals seeking to stay current on the latest
developments in their field.

Digital libraries can provide users with access to rare and out-of-print materials that might
be difficult or impossible to locate in physical libraries. Digital libraries also offer a variety
of search and sorting features, as well as social media-like features that can connect users
with others to discuss topics.

Multimedia data consist of alphanumeric, graphics, image, animation, video, and audio
objects. Alphanumeric, graphics, and image objects are time-independent, while
animation, video, and audio objects are time-dependent. Video objects, being a structured
combination of image and audio objects, also have an internal temporal structure which
forces various synchronization conditions. A single frame of an NTSC quality video
requires (512 × 480) pixels × 8 bits/pixel = 246 kb, while a single frame of an HDTV
quality video requires (1024 × 2000) × 24 bits/pixel = 6.1 mb. Thus, at a 100:1 compression
ratio, an hour of HDTV quality video would take 6.6 gb of storage, not even considering
the audio portion. Utilizing a database system for presentation of a video object is quite
complex, if the audio and image portions are to be synchronized and presented in a smooth
fashion.

Besides its complex structure, multimedia data require complex processing in order to
extract semantics from their content. Real-world objects shown in images, video,
animations, or graphics, and being discussed in audio are participating in meaningful
events whose nature is often the subject of queries. Utilizing state-of-the-art approaches
from the fields of image interpretation and speech recognition, it is often possible to extract
information from multimedia objects which is less complex and voluminous than the
multimedia objects themselves and which can give some clues as to the semantics of the
events being represented by these objects. This information consists of objects called
features, which are used to recognize similar real-world objects and events across multiple
multimedia objects.

What is a Multimedia Database?


It is a special type of Database capable of storing and managing multimedia information,
such as audio, video, images, etc, along with traditional text-based data. Following are
some examples of database management systems that support multimedia data:-

1. MongoDB GridFS
2. MySQL
3. PostgreSQL
4. IBM DB2 Content Manager
5. Oracle Multimedia
6. Microsoft SQL Server etc.

It depends on you to choose an appropriate database management system depending on the


use case and scalability requirements. Most modern databases can handle non-textual
multimedia data with or without additional setup.

In the next section, you will learn how to store and retrieve a video file in MongoDB using
GridFS and MongoDB driver for NodeJS.

Storing Multimedia Data in MongoDB

MongoDB has a feature called GridFS which allows you to store files larger than 16MB
that are not supported by BSON documents (BSON is the binary representation of
documents in MongoDB). GridFS converts a large file into smaller chunks. It uses two
collections, ‘chunks’ and ‘files’, one for storing the actual chunks and the other for storing
the metadata.

To get started, use the following commands in your terminal (Windows users should use GitBash
or other alternatives).
mkdir mongodb_tutorial
cd ./mongodb_tutorial

Creates a new directory and makes it the working directory.

yarn init -y
touch index.js

Initializes a Node project and creates index.js file.

yarn add mongodb

Installs official MongoDB drivers for NodeJS

Now, open index.js in a code editor such as VSCode and copy and paste the following code.

const fs = require('fs')
const { MongoClient, GridFSBucket } = require('mongodb')

const MONGODB_URL = 'YOUR_MONGODB_URI'; // MongoDB connection URI


const DB_NAME = 'video_tutorial'; // Name of your MongoDB database
const COLLECTION = 'videos'; // Name of the collection to store videos

// Read video file from disk


const FILE_PATH = './video.mp4'; // Path to video file
const SAVE_PATH = './retrieved_video.mp4';
const VIDEO_NAME = 'video.mp4'; // Name of the video file in MongoDB

// Function to store video in MongoDB using GridFS


async function storeVideo() {
const client = new MongoClient(MONGODB_URL);

try {
// Connect to the MongoDB server
await client.connect()
console.log('CONNECTED')

// Access the database


const db = client.db(DB_NAME)

// Create a new GridFS bucket


const bucket = new GridFSBucket(db, {
bucketName: COLLECTION
})

// Open the video file for reading


const videoStream = fs.createReadStream(FILE_PATH)

// Create an upload stream to store the video


const uploadStream = bucket.openUploadStream(VIDEO_NAME)

// Pipe the video stream into the upload stream


videoStream.pipe(uploadStream)

// Event listener for upload completion


uploadStream.on('finish', () => {
console.log('Video stored successfully')
client.close()
})

// Event listener for any errors during upload


uploadStream.on('error', (err) => {
console.error('Error storing video:', err)
client.close()
})
} catch (err) {
console.error('Error:', err)
client.close()
}
}

async function retrieveVideo() {


const client = new MongoClient(MONGODB_URL)

try {
await client.connect();
console.log('Connected to MongoDB')
const db = client.db(DB_NAME)

const bucket = new GridFSBucket(db, {


bucketName: COLLECTION
})

// Create a write stream to save the video locally


const downloadStream = fs.createWriteStream(SAVE_PATH)

// Open a download stream to retrieve the video


const videoStream = bucket.openDownloadStreamByName(VIDEO_NAME)

// Pipe the video stream into the download stream


videoStream.pipe(downloadStream)

// Event listener for when the download is complete


downloadStream.on('finish', () => {
console.log('Video downloaded and saved successfully')
client.close()
})

// Event listener for any errors during download


downloadStream.on('error', (err) => {
console.error('Error downloading video:', err)
client.close()
})
} catch (err) {
console.error('Error:', err)
client.close();
}
}

storeVideo().then(()=>retrieveVideo()).catch(e=>console.log(e))
You can also try this code with Online Javascript Compiler

Run the following command in your terminal to run this script.

node index.js

If no errors occur, your project directory will have the retrieved video.

Similarly, you can store large files in a MongoDB database with a simple script. Let’s now look
at some common use cases of a multimedia database.

Use Cases of Multimedia Databases


On a small scale, the added complexity of multimedia databases outweighs the benefits they
offer. However, these databases are crucial for efficiently managing large volumes of multimedia
information. Following are some of the use cases of these databases:-

 Entertainment and Media Streaming

Streaming services like Netflix and Amazon Prime rely heavily on highly efficient
multimedia databases to deliver video content at varying stream qualities to thousands of
endpoints.

 Educational Platforms

Due to the rise in e-learning, many companies offer educational content online, including
video lectures, notes, live classes, etc. Multimedia databases play a vital role in such
educational systems.

 Media Asset Management

Advertising agencies depend on multimedia databases for storing all sorts of media
assets, such as images, videos, graphics, etc., for efficiently managing media campaigns.
Content creators also rely on these databases as they have to deal with large volumes of
video content, which can be tough to work without a dedicated database.

 Healthcare and Medical Imaging

In medical fields, multimedia information such as MRI scans, X-Rays, Ultrasound


Imagery, etc., are stored in multimedia databases so doctors can quickly examine patient
history for future diagnosis or treatments.

Now that you are familiar with some common use cases of multimedia databases, let us look at
how a relational database stores multimedia information.

Storing Multimedia Information in Relational Databases


Following are some common approaches used in relational databases for storing multimedia data
such as images and videos:-

 SQL databases have a special datatype called BLOB which allows them to support the storage of
large chunks of data directly in tables. It is suitable for smaller-sized multimedia files.

 Paths to multimedia data stored in the file system can be added to tables. The database stores
the metadata while the actual multimedia file is stored in the file system. It is useful when there
is a limitation on BLOB sizes.

 A hybrid approach involves using both BLOBS and references to multimedia files. Smaller files
are directly stored in the database while the larger files are stored in the file system.

Different types of management systems utilize different techniques for storing multimedia files,
some of which may provide additional functionality such as video transcoding, adaptive bitrate
streaming, etc.

The following section will compare file-based multimedia storage and multimedia databases.

File-Based Storage vs. Multimedia Database


File-Based multimedia storage directly stores the data in the file system, while multimedia
databases use special underlying data structures to store the information. Both of these have their
advantages and disadvantages.

Advantages of File-Based Storage:-

 Storing multimedia files doesn’t require additional software; the data is stored directly in the file
system.

 The read-and-write performance is suitable for large multimedia files.

 The files are stored without any modification. Thus the data integrity is maintained.

 Integration with existing applications is straightforward.

Disadvantages of File-Based Storage:-

 Performing complex searches based on different criteria is impossible as the file system lacks
querying capabilities.

 Data can be inconsistent due to multiple instances of the same multimedia file because every
time a modification is made, all the instances must be changed.

 It is less scalable when large volumes of data have to be handled.

 Additional tools have to be set up to implement backup and security features.

Advantages of Multimedia Databases:-

 Database management systems provide complex querying abilities, allowing you to search
based on various metadata parameters.

 Databases ensure consistency by supporting transactions and ensuring all the updates are
managed efficiently.

 They are more scalable than file-based storage, which helps handle high volumes of data.

 Modern database systems have inbuilt tools for backup and recovery in case of failures. They
also provide security features that ensure unauthorized personnel do not access your data.

Disadvantages of Multimedia Databases:-

 Multimedia databases add a layer of complexity to storing and retrieving data from the
database, which may outweigh the advantages in smaller-scale applications.

 Working with these databases requires some learning which may not be ideal.

 The performance may seem degraded when compared to direct access. This occurs due to the
additional features provided by the database.

 Some multimedia databases may mutate the raw files to store information efficiently. This
results in a loss of data integrity.

When it comes to complex web applications or other similar large-volume use cases, using a
database is highly recommended as they are much more scalable and secure than file-based
storage.

Frequently Asked Questions


What are horizontal and vertical scaling?

Horizontal scaling is a technique used for handling high workloads by adding more machines or
servers.

Vertical scaling, on the other hand, focuses on upgrading a single machine or server to endure
increased workloads.

What are transactions in databases?

A transaction is a group of operations performed on a database that can be considered a single


operation. This allows the database to have consistency among the various instances of the same
multimedia file.

What is a BLOB in a multimedia database?

A BLOB (binary large object) is a special data type in relational database management systems
that stores large chunks of multimedia information directly in a table in the form of a contiguous
sequence of bytes.

What is adaptive bitrate streaming?

Online streaming platforms serve multimedia of varying qualities depending on the network
condition of the user endpoint, and they do so by encoding files in multiple qualities or bitrates
and dynamically changing as the network conditions change.

Conclusion
Multimedia Databases are used for efficiently handling large volumes of multimedia
information. They provide tools like video transcoding, compression, multi-bitrate encoding,
etc., and complex querying abilities. Relational databases use BLOBS and references to store
multimedia files, while non-relational databases such as MongoDB convert multimedia files into
smaller chunks.

Overall, multimedia databases are crucial for various applications such as education,
entertainment media, advertising, etc., as large data volumes have to be managed.

What is Database Integration?


Database integration combines data from diverse sources to create a consolidated version. These
sources include databases, the cloud, data warehouses, virtual databases, files, and more.
Database integration makes data accessible to multiple stakeholders and client applications
without reducing data quality.

Let’s understand this concept using an example. For instance, a company stores its accounting
data in the Oracle database and customer data in Salesforce. By utilizing the DB integration
processes, employees can access the combined data of both systems in one place.

Employees can then use the information to draw actionable insights in lesser time. Similarly,
some businesses utilize website integration to manage and unify data from various web pages. It
perceives the web as multiple heterogeneous databases.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy