CH8 Connecting Web Apps to Database Flashcards

1
Q

Data

A

–data is the plural of the word datum which is synonymous to information.
–It includes any attributes related to any object.
–e.g. height and weight are some attributes related to you and a form of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Database

A
  1. refers to a systematic collection of data
  2. information is organized in such a way that makes data management easy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DBMS

A

Database Management System (DBMS) is a collection of programs which enables the users to access the database, manipulate data, and help in the representation of data.

It was first implemented by Charles Bachman in 1960s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the types of DBMS?

A
  1. Hierarchical DBMS
  2. Network DBMS
  3. Relational DBMS
  4. Object Oriented Relational DBMS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Hierarchical DBMS

A
  1. shows a parent-child relationship of storing data
  2. not in use nowadays
  3. its structure is like a tree with nodes representing records and branches representing fields
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Network DBMS

A
  1. supports many-to-many relationships
  2. results in a complex database structure
  3. e.g. dm server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Relational DBMS

A

–database relationships are portrayed in the form of tables, also called relations
–pre-defined data types are supported
–most popular DBMS type used worldwide
–e.g. MySQL, Oracle and Microsoft SQL server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Object-Oriented Relational DBMS

A
  1. supports the storage of new data types
  2. data is stored in the database in the form of objects
    e.g. PostgreSQL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SQL

A
  1. the user may extract data from the database using a web app
  2. the web app therefore needs to communicate with the database
  3. this 2-way communication is possible through a language called SQL.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

mysqli_connect

A

Connects the web app to the MySQL server

$con=mysqli_connect(“localhost”,”USERNAME”,””);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

mysqli_select_db

A

Sets an active connection with the database

mysqli_select_db($con,”DATABASE NAME”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

mysqli_query

A

executes the query
$data=mysqli_query($sqlquery);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

mysqli_fetch_row

A

fetches the record from the table

$result=mysql_query($con,$sqlquery);
$row=mysqli_fetch_row($result);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Write down the main steps in connecting the web app to the database to obtain result from the table.

A
  1. creating a connection with the MySQL server

$con=mysqli_connect (“localhost”, “USERNAME”, “”);

  1. creating an active connection with the database

mysqli_select_db ($con, “DATABASE NAME”);

  1. Creating an SQL query to fetch data from the table

$sqlquery=”select * from details where rollno=$rollno”;

  1. Executing the query

$data=mysqli_query($sqlquery);

  1. Displaying the query result

$result=mysqli_query($con, $sqlquery);
$row=mysqli_fetch_row($result);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly