Wednesday, October 19, 2016

Chapter 5 - Database Processing


We need to use either a database or spreadsheets to keep track our datas, depending whether you want a single theme or multiple. For example, if you only need to keep track of the students’ grades, then spreadsheet is good enough. But if you desired to add more information such as email addresses, phone numbers, office visits, then a database should be used.


A database is a self-describing collection of integrated records. Each character such as letter, number, or symbol is called a byte. Bytes in databases are often grouped in columns, such as student ID and student name. Columns are often called fields. Rows of fields are grouped and called records. And a group of similar rows or records are called a table or a file. Metadata are data that describes the structure of the database. Each student is identified by a student number. So when a certain student table is created, teachers can reference the students number and identify a particular student. A key is often referred to as a primary key, which means a column or group of columns that identifies a unique row in a table. Each table we created should have a key. For example, the key of email is emailnum. Student numbers in the email and office visit table are called foreign keys because it does not uniquely identify a row. Foreign keys are used when columns are keys, but they are keys of a different table. Relation databases are databases that carry their data in the form of the tables and that represent relationships using foreign key.
A database is a self-description collection of integrated records. This means that databases contains its description within itself.


A database management system (DBMS) is a program used to create, process, and administer a database. Companies often buy license DBMS products from vendors such as IBM, Microsoft, Oracle, and others.


Datas can be useful if property formatted. A database application can help organize forms, reports, queries, and application program for easier usage for users.


The DBMS is the database server that applications and web servers are connected to, and users are using to internet to connect to that web servers. Browser applications are thin-client applications that does not required pre-installation. Browser database application such as forms, reports, and queries are displayed and processed using html, css3, and Javascript.


Most web users encounter a common issue while using the traditional browser-based applications involved multiple users processing the same database. For example, 2 person are accessing a site that is selling an event ticket. The site only has 1 ticket left. Both person can see that the ticket is available and proceed to buy them. Whoever made the payment first will get the ticket. This problem is also known as the lost-update problem. In order to avoid this issue, we must develop some sort of locking system to correspond to the information available at a given time.  


Entities are things that users want to track. Entities have attributes and identifier that are used to describe the entity. These entities have relationship that connect them to each other. There are different types of relationships such as one to one, one-to-many, many to one, and many to many relationship.


Database design is the process of transforming a data model into tables, relationships and data constraints. There are 2 important concepts of database design concepts: normalization and the representation of two kinds of relationships. Normalization is where you take a poorly structured table and transform it into a better one. Data integrity is known as an big issue where data are repeated. By normalizing the tables, we can eliminate data duplication. The idea of normalizing tables is to create 1 common theme for each table. If the tables have two themes such as employees and departments, they need to be separated into 2 tables.
Once the tables are normalize, the next step is to represent relationship. To represent a relationship we must add foreign key to one of the 2 tables we want to have relationship.

No comments:

Post a Comment