Advance Database Management System Week 1 - 3
Advance Database Management System Week 1 - 3
BSIT-2Z
Issue No.
INTRODUCTION
In this module, you will review and recall terms on database concepts such as data and
information. The importance of good database design. The business rule and how they
influence design.
LEARNING TARGET
After completing this chapter, you will be able to:
• Define the difference between data and information
• Describe what a database is, the various types of databases, and why they are valuable assets
for decision making
• Explain the importance of database design
• Define what business rules are and how they influence database design
• Identify the relational model’s basic components and explain the structure, contents, and
characteristics of a relational table
ENGAGE
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 2 of 48
2. Explain the differences or the relationships among data, information, and a database.
____DATA are raw facts that have not been processed, _____INFORMATION=_is
data that has been processed and given context. DATABASE help to facilitate the
manipulation of data to create information by providing an organizational structure
that makes relationships and connections between data explicit.
_____________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 3 of 48
EXPLAIN
Data versus Information
To understand what drives database design, you must understand the difference between data
and information.
Data consists of raw facts. The word raw indicates that the facts have not yet been processed
to reveal their meaning.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 4 of 48
Data is the foundation of information, which is the bedrock of knowledge—that is, the body
of information and facts about a specific subject. Knowledge implies familiarity, awareness,
and understanding of information as it applies to an environment. A key characteristic of
knowledge is that “new” knowledge can be derived from “old” knowledge.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 5 of 48
ELABORATE
Each part of the entire ID is the data; course, year, section, student number, name, email, age,
address, contact number as well as the picture is the data.
Scenario 1: Your teacher wants to know how many students are from Alabang.
Because of your address on your ID, the teacher can verify each of your ID and check the
address, the process of checking the address is now the extraction or processing part.
After finishing the process, the teacher now has the number, example he got 20 students from
Alabang and 30 are not from Alabang.
The 20 from Alabang would not be possible if your ID does not contain Address. The 20 from
Alabang came from the data which is the address.
The information will always be based from the given data, there are information that cannot
be provided because of lack of data.
Scenario 2: Your teacher now wants to know how many males and how many females are
there in your class.
Do you think the teacher can accomplish this problem by depending on your ID?
Because of lack of data which is the gender, there are no data that the teacher can extract to
get the number of males and females.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 7 of 48
Can the teacher depend on names to determine if a student is male and or female?
Some male names sound like females and some female names sound like males.
Again, information relies always on data. Without data you cannot have an information. Thus,
managing information is managing data as well.
Efficient data management typically requires the use of a computer database. A database is a
shared, integrated computer structure that stores a collection of the following:
• End-user data or data—that is, raw facts of interest to the end user
• Metadata, or data about data, through which the end-user data is integrated and managed
The metadata describes the data characteristics and the set of relationships that links the data
found within the database.
For example, the metadata component stores information such as the name of each data
element, the type of values (numeric, dates, or text) stored on each data element, and whether
the data element can be left empty.
Example: Age of certain student is 17. 17 is the data and the metadata for the age is number or
numeric.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 8 of 48
Santos is the surname of a certain employee. Santos is the actual data and the metadata is text
or string.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 9 of 48
EXPLAIN
Database design refers to the activities that focus on the design of the database structure that
will be used to store and manage end-user data.
A database that meets all user requirements does not just happen; its structure must be
designed carefully.
In fact, database design is such a crucial aspect of working with databases that most of this
book is dedicated to the development of good database design techniques.
Even a good DBMS will perform poorly with a badly designed database.
Database design is just like planning. Just like any other goal to want to achieve it is best way
if you plan.
Remember database stores not just hundreds of records or thousands. It involves millions and
millions of records so if you do not plan or have a good design of your database you will be
having problems in the future.
Situation:
If your entire family will be going on an outing which vehicle do you prefer? A tricycle? A
Jeep? Or a motorcycle?
The answer of course is jeep. Why? Since jeep could cater more persons than the tricycle or
the motorcycle.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 10 of 48
What would happen if you picked tricycle? Well if your family has only 4 members maybe it
can already accommodate. But what if along the way, you see your five cousins who are also
willing to join your outing?
The problem now arises. Just like database design you need to foresee the future. Records
inside your database keeps on increasing. It is NOT good practice to keep on
RESTRUCTURING your database every now and then.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 11 of 48
ELABORATE
Figure 1.7 describes the following terms that you must be familiarized:
DATA - raw facts, such as a telephone number, a birth date, a customer name, and a year-to
date (ytd) sales value.
Data has little meaning unless it has been organized in some logical manner.
RECORD - A logically connected set of one or more fields that describes a person, place, or
thing.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 12 of 48
For example, the fields that constitute a record for a customer might consist of the customer's
name, address, phone number, date of birth, credit limit, and unpaid balance.
FILE - A collection of related records.
For example, a file might contain data about the students currently enrolled at gigantic
University.
EXPLAIN
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 13 of 48
Business Rules
A business rule is a brief, precise, and unambiguous description of a policy, procedure, or
principle within a specific organization. In a sense, business rules are misnamed: they apply
to any organization, large or small—a business, a government unit, a religious group, or a
research laboratory—that stores and uses data to generate information.
Business rules must be rendered in writing and updated to reflect any change in the
organization’s operational environment. Properly written business rules are used to define
entities, attributes, relationships, and constraints.
For example, a pilot cannot be on duty for more than 10 hours during a 24-hour period, or a
professor may teach up to four classes during a semester.
Any time you see relationship statements such as “an agent can serve many customers, and
each customer can be served by only one agent,” business rules are at work. You will see the
application of business rules throughout this book, especially in the chapters devoted to data
modeling and database design.
To be effective, business rules must be easy to understand and widely disseminated to ensure
that every person in the organization shares a common interpretation of the rules. Business
rules describe, in simple language, the main and distinguishing characteristics of the data as
viewed by the company.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 14 of 48
• A customer may generate many invoices.
• A training session cannot be scheduled for fewer than 10 employees or for more than 30
employees.
Note that those business rules establish entities, relationships, and constraints.
For example, the first two business rules establish two entities (CUSTOMER and INVOICE)
and a 1:M relationship between those two entities. The third business rule establishes a
constraint (no fewer than 10 people and no more than 30 people) and two entities
(EMPLOYEE and TRAINING), and also implies a relationship between EMPLOYEE and
TRAINING.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 15 of 48
The main sources of business rules are company managers, policy makers, department
managers, and written documentation such as a company’s procedures, standards, and
operations manuals. A faster and more direct source of business rules is direct interviews
with end users. Unfortunately, because perceptions differ, end users are sometimes a less
reliable source when it comes to specifying business rules. For example, a maintenance
department mechanic might believe that any mechanic can initiate a maintenance procedure,
when actually only mechanics with inspection authorization can perform such a task. Such a
distinction might seem trivial, but it can have major legal consequences. Although end users
are crucial contributors to the development of business rules, it pays to verify end-user
perceptions. Too often, interviews with several people who perform the same job yield very
different perceptions of what the job components are. While such a discovery may point to
“management problems,” that general diagnosis does not help the database designer. The
database designer’s job is to reconcile such differences and verify the results of the
reconciliation to ensure that the business rules are appropriate and accurate.
The process of identifying and documenting business rules is essential to database design for
several reasons:
• It helps to standardize the company’s view of data.
• It can be a communication tool between users and designers.
• It allows the designer to understand the nature, role, and scope of the data.
• It allows the designer to understand business processes.
• It allows the designer to develop appropriate relationship participation rules and constraints
and to create an accurate data model. Of course, not all business rules can be modeled.
For example, a business rule that specifies “no pilot can fly more than 10 hours within any
24-hour period” cannot be modeled in the database model directly. However, such a business
rule can be represented and enforced by application software.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 16 of 48
Business rules set the stage for the proper identification of entities, attributes, relationships,
and constraints. In the real world, names are used to identify objects. If the business
environment wants to keep track of the objects, there will be specific business rules for the
objects.
As a general rule, a noun in a business rule will translate into an entity in the model, and a
verb (active or passive) that associates the nouns will translate into a relationship among the
entities.
For example, the business rule “a customer may generate many invoices” contains two nouns
(customer and invoices) and a verb (generate) that associates the nouns.
For example, the business rule “a customer may generate many invoices” is complemented
by the business rule “an invoice is generated by only one customer.”
In that case, the relationship is one-to-many (1:M). Customer is the “1” side, and invoice is
the “many” sides.
To properly identify the relationship type, you should generally ask two questions:
• How many instances of B are related to one instance of A?
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 17 of 48
• In how many classes can one student enroll? Answer: many classes.
• How many students can enroll in one class? Answer: many students.
Therefore, the relationship between student and class is many-to-many (M:N). You will have
many opportunities to determine the relationships between entities as you proceed through
this book, and soon the process will become second nature.
EXPLAIN
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 18 of 48
Relational database terminology is very precise.
Unfortunately, file system terminology sometimes creeps into the database environment.
Thus, rows are sometimes referred to as records, and columns are sometimes labeled as
fields.
The database table is a logical concept rather than a physical concept, and the terms file,
record, and field describe physical concepts.
Nevertheless, as long as you recognize that the table is actually a logical concept rather than a
physical construct, you may think of table rows as records and table columns as fields.
In fact, many database software vendors still use this familiar file system terminology.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 19 of 48
Review of terms from previous lesson:
The fields or attributes are lname, fname, course, yr, email, section.
The number of records or number of tuples is 8. Starting from the record of Reyes, John until
the record of Solomon, Andy.
Again, throughout this module you will always encounter these terms so please read and
understand.
Keys or Superkeys
In the relational model, keys are important because they are used to ensure that each row
in a table is uniquely identifiable.
They are also used to establish relationships among tables and to ensure the integrity of the
data.
A certain database can contain two or more tables. Those tables must be linked or relate
together using this keys that you will be learning. Hence, the relational came from the word
relate, to link tables two or more tables together.
A key consists of one or more attributes that determine other attributes. Example of one
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 21 of 48
On the other hand, (studid+lname) is a superkey, but it is not a candidate key because
STU_LNAME could be removed and the key would still be a superkey.
Candidate keys are called candidates because they are the eligible options from which the
designer will choose when selecting the primary key.
The primary key (PK) is the candidate key chosen to be the primary means by which the
rows of the table are uniquely identified.
Example, StudId.
Entity integrity is the condition in which each row (entity instance) in the table has its own
unique identity.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 22 of 48
From a theoretical perspective, it can be argued that a table that contains a null is not properly
a relational table at all. From a practical perspective, however, some nulls cannot be
reasonably avoided. For example, not all students have a middle initial.
A foreign key (fK) is the primary key of one table that has been placed into another table to
create a common attribute.
The studid on tblgrade is the primary key on tblStudent and a foreign key on tblgrade.
The primary key on one table and the foreign key on the other table us used to connect
both tables.
Just as the primary key has a role in ensuring the integrity of the database, so does the foreign
key.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 23 of 48
Foreign keys are used to ensure referential integrity, the condition in which every reference to
an entity instance by another entity instance is valid.
In other words, every foreign key entry must either be null or a valid value in the primary key
of the related table.
EXPLAIN
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 24 of 48
In this lesson, you will learn how ERD is applied on tables and its relationship.
ONE-TO-MANY
ONE-TO-ONE
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 25 of 48
EXPLAIN
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 26 of 48
The ERD represents the conceptual database as viewed by the end user.
ERDs depict the database’s main components: entities, attributes, and relationships.
Because an entity represents a real-world object, the words entity and object are often used
interchangeably.
Because of its emphasis on implementation, the Crow’s Foot notation can represent only
what could be implemented. In other words:
• The Chen notation favors conceptual modeling.
• The Crow’s Foot notation favors a more implementation-oriented approach. • The
UML notation can be used for both conceptual and implementation modeling.
Entities
Attributes
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 27 of 48
For example, the PAINTER entity includes the attributes pid, pname among many others.
In the original Chen notation, attributes are represented by ovals and are connected to the
entity rectangle with a line.
In the Crow’s Foot notation, the attributes are written in the attribute box below the entity
rectangle.
Attribute Types
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 28 of 48
A required attribute is an attribute that must have a value; in other words, it cannot be left
empty.
Example, lastname and firstname require data entries because all person are assumed to have
a names.
However, not all have a middle name, and perhaps they do not yet have a phone number and
an email address.
Therefore, those attributes are not presented in boldface in the entity box.
An optional attribute is an attribute that does not require a value; therefore, it can be left
empty.
For example, the domain for a grade point average (GPA) attribute is written (0,4) because
the lowest possible GPA value is 0 and the highest possible value is 4.
The domain for a gender attribute consists of only two possibilities: M or F (or some other
equivalent code).
The domain for a company’s date of hire attribute consists of all dates that fit in a range (e.g.,
company startup date to current date).
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 29 of 48
The ERM uses identifiers—one or more attributes that uniquely identify each entity instance.
In the relational model, entities are mapped to tables, and the entity identifier is mapped as
the table’s primary key (PK).
Identifiers are underlined in the ERD.
Key attributes are also underlined in a frequently used shorthand notation for the table
structure, called a relational schema, that uses the following format:
Composite Identifiers
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 30 of 48
A composite attribute, not to be confused with a composite key, is an attribute that can be
further subdivided to yield additional attributes.
For example, the attribute ADDRESS can be subdivided into street, city, state, and zip code.
Similarly, the attribute PHONE_ NUMBER can be subdivided into area code and exchange
number.
For example, age, sex, and marital status would be classified as simple attributes.
Single-Valued Attributes
For example, a person can have only one Social Security number, and a manufactured part
can have only one serial number.
Multivalued Attributes
For instance, a person may have several college degrees, and a household may have several
different phones, each with its own number.
Derived Attributes
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 31 of 48
A derived attribute is an attribute whose value is calculated (derived) from other attributes.
The derived attribute need not be physically stored within the database; instead, it can be
derived by using an algorithm.
Example, the Age of a person. Using an SQL function, you can compute for the age of a
person.
Developing an ER diagram
The process of database design is iterative rather than a linear or sequential process.
The verb iterate means “to do again or repeatedly.” Thus, an iterative process is based on
repetition of processes and procedures.
ELABORATE
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 32 of 48
On the previous lesson you have learned how to create an ERD. The ERD that you have
learned was Chen’s Notation.
This time, you will be learning how create an ERD - Crow’s Foot Notation.
Crows Foot Notation comes from the word “CROW” because the symbol used looks like
crow’s foot.
COMPARISON
Compared with Chen’s Notation, the Crow’s Foot Notation is easier to draw because you
only need to draw a rectangle and put a line on the upper part to separate ENTITY and its
attributes. Crow’s Foot Notation is more precise when it comes to connectivity.
WHAT IS MANY?
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 33 of 48
Cardinality - expresses the minimum and maximum number of entity occurrences associated
with one occurrence of the related entity.
How do you consider a certain person as painter? If he has AT LEAST one painting. So
therefore, a painter must have at least one painting and can have many paintings. We can
now revise the rule above and replace the many with more precise connectivity.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 34 of 48
Revised: a DEAN can be assigned to one and only one COLLEGE and
a COLLEGE can only be managed by one and only one DEAN
Try to draw the ERD of the given business rule below using Crow’s Foot Notaion.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 35 of 48
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 36 of 48
The diagram above shows the symbols of different attributes that you need to use when
indicating an attribute on ERD.
On Crow’s, you need to add the cardinality, the minimum and the maximum occurrences
(1,5).
The primary key attribute is underlined and a label on the left side is indicated (PK) and (FK).
Example: An ERD of a student database using both Chen’s Notation and Crow’s Foot
Notation.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
QD/CITCS/0__ Course Title: ADVANCE DATABASE MANAGEMENT SYTEM
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 37 of 48
On Crow’s Foot Notation, it is more precise as to how many students can a class have.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 38 of 48
And the connection between two entities is clearer than on Chen’s. Lines is connected
between PK from STUDENT entity and FK from CLASS entity unlike again on Chen’s.
NOTE: The minimum and the maximum will also be based on the Business Rules.
Different schools have different rules.
ENGAGE
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 39 of 48
Look and study the table in SQL 1.1 and answer the following questions below.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 40 of 48
_______________________________________________________________ EXPLAIN
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 41 of 48
SQL 1.1 – List of Students
The image above is called a Table. A table is an object where the actual data resides.
studID, lname, fname, course, yr and section are called Fields, or columns on the table.
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 42 of 48
Technically you cannot see the actual database, what is visible to you is the table,
fields(columns) and records(information).
Do not forget this lesson for you to not be confused on future lessons especially if you are
doing the SQL.
ELABORATE
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 43 of 48
Creating a database and a table using SQL.
Database name: dbCITCS
Table name: tblStudent
Fields: Types:
studID integer
lname string
fname string
course string
yr integer
section char
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 44 of 48
A table is inside a database, and the data are inside the table. So following the order, the
database must be created first, then the table and after you create the table you can now insert
the records.
A database and a table has its name, in the example above the name of the database is CITCS
and the name of the table is Student.
But for readability purpose and to avoid confusion among your objects, you can add a prefix
for database and table.
Naming a field. The first field or first column is studID which stands for student id. The
second field is lname which stands for lastname.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 45 of 48
You can use any field name, but I suggest to simplify your name, avoid long names for you
will be using this names on your codes. The longer the names of your fields the longer your
codes will be.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 46 of 48
EVALUATE
Derived Entity
RECORD Database design
Single-valued Information
Raw Required
Database Business Rule
Metadata
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 47 of 48
specialization DOCTOR
III. Identify what type exists between two given entities. And draw the ERD for each.
LEARNING PAMANTASAN NG LUNGSOD NG MUNTINLUPA
MODULE COLLEGE OF INFORMATION
TECHNOLOGY AND COMPUTER STUDIES
University Road, Poblacion, Muntinlupa City
Issue No. 0 Revision No. 0 Effectivity Date 07 September 2020 Page No. 48 of 48