answersLogoWhite

0

📱

Database Programming

Databases are collections of tables that maintain and display information, often collaboratively; this information can be used for interaction with an application or gaining general knowledge. Questions about database engines and modifying or using them belong in this category.

8,803 Questions

List the characteristic of the modern DBMS?

Characteristics of modern database are as follows:

a) Data is secured in modern database

b) Data is easily accessible in modern database

c) Data is non redundant in modern database

What command is used to change contents of one database using the contents of another database by linking them on a common key field?

The SQL command UPDATE can be used to change contents of one database using the contents of another database by joining them on a common key field. You would typically use a query with a join condition between the two tables based on the common key field to update the fields in the target table with values from the source table.

What is a firsthand data?

Firsthand data is information that is collected directly from the source or through direct experience. This type of data is considered more reliable and accurate as it is obtained firsthand rather than being interpreted or communicated by others. Examples of firsthand data include observations, surveys, interviews, and experiments.

What is the definition for a database field?

A field is an item of information which is stored for all records in a database.

Example for a car dealership:

  1. Information about cars for sale is stored in a table
  2. A table consists of rows and columns of information
  3. Each row is called a record and these hold information relating to one car.
    1. Car Registration
    2. Manufacturer
    3. Model
    4. Colour
    5. Purchase price
    6. Sale price
  4. The column in the table will contain different items of information. These are called fields. Examples:
  5. If you created a table to store this information using a spreadsheet package then you would instinctively add meaningful headings for each of the columns. These headings are basically the field names of your database.

Who created experian?

Experian was founded by a group of people in London in 1996, but the company traces its roots back to 1980. Sir John Peace was one of the key individuals involved in the creation and expansion of Experian into a major credit reporting and information services company.

Record is a collection of related fields?

A record is a structured set of data that contains fields, each of which holds specific information. It is used to organize and store data in databases or other information storage systems. Records are commonly used to represent individual entities or items within a dataset.

How can you retrieve data from database in drop down box?

You will need a server-side language (and, obviously, a database) to accomplish that. Here's a very simple example, using PHP and MySQL. ---- <?php // Connect to MySQL and select a database (if either one fails, stop the script) $connect = mysql_connect('username', 'password') or exit('Connection failed.'); $select = mysql_select_db('database') or exit('Database Selection failed.'); // Retrieve data from the database. $sql = "SELECT `name` FROM `fruits`"; $query = mysql_query($sql); if (!$query) { exit('The query failed.'); } // Create a drop-down box. echo "<input type='select'>"; // For each row returned, create an option element for it. while ($fruit = mysql_fetch_assoc($query)) { echo "<option>"; echo $fruit['name']; echo "</option>"; } // End the drop-down box. echo "</select>"; ?>

What terms describes a collection of data organized in a manner that allows access retrieval and use of that data?

A database is a collection of data organized in a structured manner that allows for efficient storage, retrieval, and manipulation of information. It typically uses tables to store data, with each table containing rows and columns that represent individual records and attributes, respectively.

Compare and contrast traditional file system and computerized database approach?

Comparison of Traditional File-Based Approach and Database Approach

At the beginning, you should understand the rationale of replacing the traditional file-based system with the database system.

File-based System

File-based systems were an early attempt to computerize the manual filing system. File-based system is a collection of application programs that perform services for the end-users. Each program defines and manages its data.

However, five types of problem are occurred in using the file-based approach:

Separation and isolation of data

When data is isolated in separate files, it is more difficult for us to access data that should be available. The application programmer is required to synchronize the processing of two or more files to ensure the correct data is extracted.

Duplication of data

When employing the decentralized file-based approach, the uncontrolled duplication of data is occurred. Uncontrolled duplication of data is undesirable because:

i. Duplication is wasteful

ii. Duplication can lead to loss of data integrity

Data dependence

Using file-based system, the physical structure and storage of the data files and records are defined in the application program code. This characteristic is known as program-data dependence. Making changes to an existing structure are rather difficult and will lead to a modification of program. Such maintenance activities are time-consuming and subject to error.

Incompatible file formats

The structures of the file are dependent on the application programming language. However file structure provided in one programming language such as direct file, indexed-sequential file which is available in COBOL programming, may be different from the structure generated by other programming language such as C. The direct incompatibility makes them difficult to process jointly.


Fixed queries / proliferation of application programs

File-based systems are very dependent upon the application programmer. Any required queries or reports have to be written by the application programmer. Normally, a fixed format query or report can only be entertained and no facility for ad-hoc queries if offered.

File-based systems also give tremendous pressure on data processing staff, with users' complaints on programs that are inadequate or inefficient in meeting their demands. Documentation may be limited and maintenance of the system is difficult. Provision for security, integrity and recovery capability is very limited.

Database Approach

In order to overcome the limitations of the file-based approach, the concept of database and the Database Management System (DMS) was emerged in 60s.

Advantages

A number of advantages of applying database approach in application system are obtained including:

Control of data redundancy

The database approach attempts to eliminate the redundancy by integrating the file. Although the database approach does not eliminate redundancy entirely, it controls the amount of redundancy inherent in the database.

Data consistency

By eliminating or controlling redundancy, the database approach reduces the risk of inconsistencies occurring. It ensures all copies of the idea are kept consistent.

More information from the same amount of data

With the integration of the operated data in the database approach, it may be possible to derive additional information for the same data.

Sharing of data

Database belongs to the entire organization and can be shared by all authorized users.


Improved data integrity

Database integrity provides the validity and consistency of stored data. Integrity is usually expressed in terms of constraints, which are consistency rules that the database is not permitted to violate.

Improved security

Database approach provides a protection of the data from the unauthorized users. It may take the term of user names and passwords to identify user type and their access right in the operation including retrieval, insertion, updating and deletion.

Enforcement of standards

The integration of the database enforces the necessary standards including data formats, naming conventions, documentation standards, update procedures and access rules.

Economy of scale

Cost savings can be obtained by combining all organization's operational data into one database with applications to work on one source of data.

Balance of conflicting requirements

By having a structural design in the database, the conflicts between users or departments can be resolved. Decisions will be based on the base use of resources for the organization as a whole rather that for an individual entity.

Improved data accessibility and responsiveness

By having an integration in the database approach, data accessing can be crossed departmental boundaries. This feature provides more functionality and better services to the users.

Increased productivity

The database approach provides all the low-level file-handling routines. The provision of these functions allows the programmer to concentrate more on the specific functionality required by the users. The fourth-generation environment provided by the database can simplify the database application development.

Improved maintenance

Database approach provides a data independence. As a change of data structure in the database will be affect the application program, it simplifies database application maintenance.

Increased concurrency

Database can manage concurrent data access effectively. It ensures no interference between users that would not result any loss of information nor loss of integrity.

Improved backing and recovery services

Modern database management system provides facilities to minimize the amount of processing that can be lost following a failure by using the transaction approach.

Disadvantages

In split of a large number of advantages can be found in the database approach, it is not without any challenge. The following disadvantages can be found including:

Complexity

Database management system is an extremely complex piece of software. All parties must be familiar with its functionality and take full advantage of it. Therefore, training for the administrators, designers and users is required.

Size

The database management system consumes a substantial amount of main memory as well as a large number amount of disk space in order to make it run efficiently.

Cost of DBMS

A multi-user database management system may be very expensive. Even after the installation, there is a high recurrent annual maintenance cost on the software.

Cost of conversion

When moving from a file-base system to a database system, the company is required to have additional expenses on hardware acquisition and training cost.

Performance

As the database approach is to cater for many applications rather than exclusively for a particular one, some applications may not run as fast as before.


Higher impact of a failure

The database approach increases the vulnerability of the system due to the centralization. As all users and applications reply on the database availability, the failure of any component can bring operations to a halt and affect the services to the customer seriously.

Reference:

www.hkbu.edu.hk/~shtong/tim.doc

Which term refers to a specific piece of data that is stored in a database file?

A specific piece of data stored in a database file is referred to as a "record". It typically represents a single entry in a database table that contains information related to a particular entity or object.

What is the Difference between hierarchical and flat address?

Hierarchical addressing organizes addresses in a tree-like structure with levels or layers, like in IP addresses. Flat addressing treats all addresses as equal without any structure or hierarchy, like in MAC addresses.

What is the difference between SQL and file based databases?

SQL and "File Based Databases" can't really be compared directly as they refer to two different concepts.

SQL is a language for querying databases.

"File Based Databases" often refer to data storage that you manage through your own methods, rather than using a language like SQL to query and manipulate the data.

For example, MySQL stores its data in files on the hard drive. To store and manipulate the data and its structure, you use SQL queries. MySQL takes care of the data behind the scenes, and provides methods for sorting and arranging the data returned to queries. You never deal directly with the files that MySQL uses to store the data.

What are the Data staging steps in data warehousing?

Data staging in data warehousing involves steps like data extraction from source systems, data transformation to prepare it for analysis, and data loading into the data warehouse. This process ensures that data is cleansed, standardized, and organized before being stored in the data warehouse for reporting and analytics purposes.

Explain the concept of Relational Model with a real time example of a University System?

The fundamental assumption of the relational model is that all data is represented as mathematical n-ary relations, an n-ary relation being a subset of the Cartesian product of n domains. In the mathematical model, reasoning about such data is done in two-valued predicate logic, meaning there are two possible evaluations for each proposition: either true or false (and in particular no third value such as unknown, or not applicable, either of which are often associated with the concept of NULL). Some think two-valued logic is an important part of the relational model, while others think a system that uses a form of three-valued logic can still be considered relational.[citation needed][who?] Data are operated upon by means of a relational calculus or relational algebra, these being equivalent in expressive power. The relational model of data permits the database designer to create a consistent, logical representation of information. Consistency is achieved by including declared constraints in the database design, which is usually referred to as the logical schema. The theory includes a process of database normalization whereby a design with certain desirable properties can be selected from a set of logically equivalent alternatives. The access plans and other implementation and operation details are handled by the DBMS engine, and are not reflected in the logical model. This contrasts with common practice for SQL DBMSs in which performance tuning often requires changes to the logical model. The basic relational building block is the domain or data type, usually abbreviated nowadays to type. A tuple is an unordered set of attribute values. An attribute is an ordered pair of attribute name and type name. An attribute value is a specific valid value for the type of the attribute. This can be either a scalar value or a more complex type. A relation consists of a heading and a body. A heading is a set of attributes. A body (of an n-ary relation) is a set of n-tuples. The heading of the relation is also the heading of each of its tuples. A relation is defined as a set of n-tuples. In both mathematics and the relational database model, a set is an unordered collection of items, although some DBMSs impose an order to their data. In mathematics, a tuple has an order, and allows for duplication. E.F. Codd originally defined tuples using this mathematical definition. Later, it was one of E.F. Codd's great insights that using attribute names instead of an ordering would be so much more convenient (in general) in a computer language based on relations. This insight is still being used today. Though the concept has changed, the name "tuple" has not. An immediate and important consequence of this distinguishing feature is that in the relational model the Cartesian product becomes commutative. A table is an accepted visual representation of a relation; a tuple is similar to the concept of row, but note that in the database language SQL the columns and the rows of a table are ordered. A relvar is a named variable of some specific relation type, to which at all times some relation of that type is assigned, though the relation may contain zero tuples. The basic principle of the relational model is the Information Principle: all information is represented by data values in relations. In accordance with this Principle, a relational database is a set of relvars and the result of every query is presented as a relation. The consistency of a relational database is enforced, not by rules built into the applications that use it, but rather by constraints, declared as part of the logical schema and enforced by the DBMS for all applications. In general, constraints are expressed using relational comparison operators, of which just one, "is subset of" (⊆), is theoretically sufficient. In practice, several useful shorthands are expected to be available, of which the most important are candidate key (really, superkey) and foreign key constraints.

What is the first step in creating a database?

The first step in creating a database is to define the purpose and scope of the database, including identifying the data that needs to be stored and how it will be organized. This involves understanding the requirements of the system and the relationships between different data elements.

What is semi join in SQL?

A semi-join returns rows from one table that would join with another table without performing a complete join. It doesn't have explicit syntax.

Eg : semi join to evaluate an exists sub query

select *

from Customers C

where exists (

select *

from Sales S

where S.Cust_Id = C.Cust_Id

)

Cust_Id Cust_Name

----------- ----------

2 John Doe

3 Jane Doe

What is the first step OSPF and IS-IS routers take in building a shortest path first database?

The first step OSPF and IS-IS routers take in building a shortest path first database is to exchange link-state advertisements (LSAs) or link-state packets (LSPs) with neighboring routers. These packets contain information about the router's directly connected neighbors and the state of their links.

What is the difference between a Primary Key and a Secondary Key?

A Primary Key is a unique identifier for each record in a database table and is used to enforce entity integrity. A Secondary Key is a non-unique index that is used for querying and organizing data efficiently but does not have the constraint of uniqueness.

Which places use a database?

Places like banks, universities, hospitals, e-commerce websites, and social media platforms typically use databases to store and manage large amounts of data efficiently. This allows them to retrieve and update information quickly and securely.

Advantages of hierarchical paging?

Hierarchical paging can offer more efficient memory management by organizing the page table in a hierarchical structure, reducing the memory overhead compared to a single-level page table. It allows for better utilization of memory resources by only mapping the necessary page table entries in the page table, which helps in reducing the total number of page table entries needed. Additionally, hierarchical paging can improve the speed of address translation by enabling faster access to the necessary page table entries.

What are the qualities of a good information system?

A good information system should be reliable, accurate, secure, user-friendly, and timely. It should also be able to efficiently collect, store, process, and distribute information to support the organization's goals and decision-making processes.

Define what is a database?

A database is a structured collection of data that is organized for easy access, retrieval, and management. It stores information in tables, which can be interconnected to efficiently store and access data. Databases are used to manage and manipulate large volumes of data in various applications.

What are the advantages and disadvantages of SQL?

ADV

1. View the data without storing the data into the object.

2. Restrict the view of a table i.e. Can hide some of columns in the tables.

3. Join two or more tables and show it as one object to user.

4. Restrict the access of a table so that nobody can insert the rows into the table.

DISADV

1. Can not use DML operations on this.

2. When table is dropped view becomes inactive.. It depends on the table objects.

3. It is an object so it occupies space

What is query processor in distributed dbms?

The query processor in a distributed DBMS is responsible for receiving and analyzing queries from users or applications, determining how to execute the query across multiple distributed nodes, and coordinating the execution of the query to retrieve the desired data efficiently. It optimizes query performance by considering factors such as data distribution, network latency, and data transfer costs across distributed nodes.

What information is put on a database?

A database typically stores structured data such as customer information, product details, financial records, and inventory levels. It can also store unstructured data like images, text documents, and multimedia files. The specific information stored on a database will vary based on the organization's needs.