Definition of the database:
A set of data stored in the magnetic disk, optical disk or other secondary storage, collection of integrated data-related data of an enterprise (company, government or private)
Manufacturing companies have data in form production planning data actual production data material ordering data
The hospital has a patient data form of data, doctor, nurse, etc.
DATABASE MANAGEMENT SYSTEM
Collection / database combined with software applications that are based database Application programs are used to access and maintain databases The main purpose DBMS is to provide an environment that is efficient and easy to use, withdrawal and storage of data and information BIT, BYTE, Field Data bit is the part that contains the smallest value of 0 or 1 Byte is a set of bit-bit similar with the same 1 byte with 8 bits Field is a set of byte-byte similar, in the database used the term attribute
ER DIAGRAM COMPONENTS
Attribute / Field
It is the nature or characteristics of an entity that provides provide detail on these entities.
One entity will have specific values for each attribute. Each attribute has a set of values associated with it. This value is a set of data types, such as integer, string, and the other, And can also be given a certain range,
For example, an employee has a name, SSN, address, gender, date of birth.
A relationship can also have attributes
Single vs. multi value
can only be filled at most one value
Example: SSN, Sex.
can be filled with more than one value with the same type of
Color of a CAR
stated in the multi value: (color),
Atomic vs. composition
can not be divided into the attributes of smaller
is a combination of several attributes of a smaller
Address (Apt #, House #, Street, City, State, Zip Code, Country)
Attribute value can be derived from other attribute values, e.g. age resulting from the date of birth attribute
Null Value attribute
Attributes that have no value to a record attribute can have a null value if:
Mandatory attribute Value
Attributes must have values
RECORD / TUPLE
It is a line of data in a relationship Consists of the set of attributes where the attribute-attribute-attribute is to inform each other entity / relationship fully Record is a collection of field-field is structured in a format that has been determined. During the design of the system, records will be classified as fixed-length records or variable-length record.
Entity / FILE
File is a collection of similar records and have the same elements, the same attributes but different data value. A entities is an “object” (thing) or “object” (object) in the real world that
can be distinguished from all other objects. Entity sets are a set of entities
have the same type. This type of similarity can be seen from the attribute / property that
owned by the individual entities. E.g., group of people who save money on a
In processing applications, files can categorized as follows:
- Master File
- Transaction File
- File Report
- File History
- File Protection
- Job File
Domain is the set of values that are allowed to reside in one or more attributes. Each attribute in a database relational is defined as a domain
KEY DATA ELEMENT
Key elements of record which is used to find these records at the time of access, or can also be used to identify each entity / record / line.
Elections key attributes:
Key is an attribute that does not change
Example: SSN, employee_ID, SKU (stock-keeping-units), license plate number.
Key values cannot be null, must have a valid value
Example: Date of students is a bad choice to be a key. Avoid the key that has a certain intelligence or codes built in
Examples: building codes (which can be changed later)
SPECIES OF KEY
Super key is one or more attributes of a table that can be used to identify entity / record of the table are unique (not all attributes can be super key) Candidate Key is a super key with minimal attributes. Candidate must not contain a key attribute of the table so that the other candidate key is certain super key but not necessarily vice versa Primary Key One of the key attributes of the candidate can be selected / specified a primary key with the three
- Key is more natural to use as reference
- Key is more simple
- Key is guaranteed unique
Alternate Key is an attribute of the candidate key is not selected to be primary key.
Foreign Key is any attribute that point to the primary key in another table. Foreign key will be going on a relationship that has cardinalities one to many (one to many) or many to many (many to many). Foreign key is usually always put on the table that point to many.
External Key is a lexical attribute (or set of lexical attributes) that values are always identifying an object instance.
ERD (ENTITY RELATIONSHIP DIAGRAM)
ERD is a model of a network that uses word order is stored in the abstract system. ERD is a model to explain the relationship between data in the database objects based on the data base that has the relation between relations. ERD for data model structures and relationships between data, to describe used for some notation and symbols. Basically there are three symbols that are used
In the ER Diagram Entity is described with the form of a rectangle. Entity is something that exists in the real system and the abstract where the data stored or where there are data.
Individuals : employees, customers, students, and distributor.
- Place: room, building, office, field, campus.
- Object: books, motorcycles, software packages, products
- Event: registration, reservation, billing
- Concept: bank account, and qualification.
ER diagram on the relationship can be described with a lozenge. Relationship is a natural relationship that occurs between entities. In general, the name given to the verb base making it easier to do the reading relation. A relationship connecting the two / more different entity with a specific meaning.
is the number of entities participating in a relationship. Degree which is often used in the ERD.
Degree of relationship
Model is the relationship between the entities originating from the same entity set.
Model is the relationship between 2 entities.
is relationships between the instances of 3 types of entities are unilateral.
Tupel indicates the maximum number that can be relation with entities on the other entity
There are 3 cardinalities relations, namely
One to One:
Relationship one to one relationship that each entity in a set of entities associated with at most one entity in the collective entity B.
One to Many or Many to One:
Each entity in a set of entities can be related to many entities in entity set B, but each entity in the entity B can be associated with one entity on the collective entity A.
Many To Many:
Each entity in a set of entities can be associated with many entities on the collective entity B.
Refrence : Y .Primashanti Ida Ayu, Catatan Kuliah Analisis dan Perancangan Sistem.pdf
DATABASE and ER-DIAGRAM persentation of NGURAH AGUS SANJAYA ER, S.KOM,