Question

In: Computer Science

What is a database? Why do today’s Internet Web applications and smartphone apps need databases? For...

  1. What is a database? Why do today’s Internet Web applications and smartphone apps need databases?
  2. For the tables given as: MEMBER (MemberNumber, MemberFirstName, MemberLastName, EmailAddress)

And PAYMENT (PaymentNumber, MemberNumber, PaymentDate, PaymentAmount)

what are the primary keys of each table? Do you think that any of these primary keys could be surrogate keys? Are any of these keys composite keys? Explain how the two tables are related. Which table contains the foreign key, and what it is the foreign key?

  1. Define the terms data and information.   Explain how the two terms differ.

Solutions

Expert Solution

1. What is a database?

Data:

  Data is a collection of a distinct small unit of information. It can be used in a variety of forms like numbers, text, media, bytes, etc. It can be stored in pieces of paper or electronic memory, etc.

Database:

A database is an organized collection of data or structured information, which is also called as structured data and it can be typically stored and accessed electronically from a computer system. A database is usually controlled by a database management system (DBMS).

Purpose Of  Database:

  • Database is used to manage a large amount of information by storing, retrieving, and managing data.
  • People can keep track of things easily by using the database.

Uses Of Database:

Database is an essential part of our life. There are several places where we need to interact with the database.

By using the database we can easily store and manage a large amount of data at one place so fetching of the data can be easy.

for example database plays major role in the places like bank, in the railway station, in school, in a grocery store, etc.

Types Of Database:

  • Relational Database
  • Distrbuted Database
  • Cloud Database

Among these Relational Database is the most commonly used Database.

2. Why do today’s Internet Web applications and smartphone apps need databases?

Web applications and smartphone apps need databases to store, access and modify the data.

Let us consider the tables

  1. MEMBER (MemberNumber, MemberFirstName, MemberLastName, EmailAddress)

2.PAYMENT (PaymentNumber, MemberNumber, PaymentDate, PaymentAmount)

3. What are the primary keys of each table? Do you think that any of these primary keys could be surrogate keys?

Primary Key:

  A primary key is a minimal set of attributes in a table that uniquely identifies tuples in that table.A table can have only one primary key and must contain UNIQUE values, and cannot contain NULL values.

The primary key of MEMBER table is MemberNumber, and

The primary key of PAYMENT table is PaymentNumber.

A Surrogate key is any column or set of columns that can be declared as the primary key.Moreover, the common type of surrogate key is an incrementing integer, such as an auto_increment column in MySQL, or a sequence in Oracle, or an identity column in SQL Server. As we observe both MemberNumber and PaymentNumber are autoincrement columns in a table.

Hence, both of these Primary keys i.e, MemberNumber and PaymentNumber are Surrogate keys.

4. Are any of these keys composite keys?

Composit Key :A key that has more than one attributes is known as composite key. It is also known as compound key.

From the above example, the primary keys of the tables are MemberNumber and PaymentNumber, and a key said to be composite only if it contains multiple attributes but using MemberNumber and PaymentNumber alone we can get the details from the table.

   Hence, Neither of these primary keys are Composite key.

5. Which table contains the foreign key, and what it is the foreign key?

Foreign key:

   A FOREIGN KEY is a key used to link two tables together. A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table.The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.

From the above tables MEMBER and PAYMENT, both have the common attribute MemberNumber and they  are related by the field MemberNumber. This field is a unique identifier or a primary key in MEMBER, and serves as a non-unique identifier or foreign key in PAYMENT where it is identified by which row in MEMBER is associated with that specific row in PAYMENT. One row in MEMBER can be associated with many rows in PAYMENT, since each MEMBER pays dues each year.

Hence, MemberNumber acts as Foreign Key in Payment table.

6. Define the terms data and information. Explain how the two terms differ.

Data:

Data is a raw and unorganized fact that required to be processed to make it meaningful. Data can be simple at the same time unorganized unless it is organized. Generally, data comprises facts and figures.

Information:

Information is a set of data which is processed in a meaningful way according to the given requirement. Information is processed, structured, or presented in a given context to make it meaningful and useful.

Difference:

  • Bits and Bytes are used to measure the data , On the other hand, Information is measured in meaningful units like time, quantity, etc.
  • Data can be represented in the form of  tables, graph, data tree, whereas Information is language, ideas, and thoughts based on the given data.
  • Data alone has no significance while Information is significant by itself.
  • Data is independent on Information whereas nformation is dependent on Data.
  • Data can't be used for decision making whereas Itnformation is widely used for decision making.

Related Solutions

In terms of databases: What are multi level indexes? Why do we need them and are...
In terms of databases: What are multi level indexes? Why do we need them and are they any good? What are their merits and demerits?
Searching the "free web" or regular internet and searching the library databases are different activities in...
Searching the "free web" or regular internet and searching the library databases are different activities in many ways. In 200 words, discuss these differences.
Discuss the techniques for accessing databases from Java programs identical in web applications as in standalone...
Discuss the techniques for accessing databases from Java programs identical in web applications as in standalone Java programs. Need 2 references and 300 plus words
Will apps make the web irrelevant?" 1. What are the advantages and disadvantages of apps, compared...
Will apps make the web irrelevant?" 1. What are the advantages and disadvantages of apps, compared with websites, for mobile users? 2-What are the benefits of apps for content owners and creators? 3-Are apps complimentary to the web or a substitue for the web? Why or why not?
Your company is developing two web apps, one for voice calls over the internet (VoIP), and...
Your company is developing two web apps, one for voice calls over the internet (VoIP), and another for streaming music. Between TCP and UDP, explain which protocol you would use for each app and why.
What is the internet, what is the web, how are they different?
What is the internet, what is the web, how are they different? What is the main protocol for communication on the internet? What is HTTP, what is it used for? What are example HTTP responses (like 200, 404, 401)
You need to design a Web Server, Database Server and a Backup server. If you had...
You need to design a Web Server, Database Server and a Backup server. If you had to choose from the following list of resources which ones would you place a priority on and state why you would do so. List these for each server type. Hint: You need to think about the functionality of the server. Based on this information, which resource would you emphasize on the most to increase the performance of the server. CPU utilization and speed Multiprocessing...
What is connectivity? What is a computer network? What are the Internet and the Web?
What is connectivity? What is a computer network? What are the Internet and the Web? What is cloud computing, the wireless revolution, and IoT?
How do I create a backup and restore strategy for a web site and the database...
How do I create a backup and restore strategy for a web site and the database for the site?
Why do investigators need to document what they do?
Why do investigators need to document what they do?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT