The document discusses key concepts related to database systems including:
1) A database is an organized collection of data stored and accessed electronically with database management system software. It consists of tables, rows, columns and stores large amounts of information.
2) A database management system is software that allows users to create and manage databases, and provides tools to store, organize and analyze data.
3) Data models such as hierarchical, network, relational and entity relationship models define how data is structured and related in a database.
The document discusses key concepts related to database systems including:
1) A database is an organized collection of data stored and accessed electronically with database management system software. It consists of tables, rows, columns and stores large amounts of information.
2) A database management system is software that allows users to create and manage databases, and provides tools to store, organize and analyze data.
3) Data models such as hierarchical, network, relational and entity relationship models define how data is structured and related in a database.
The document discusses key concepts related to database systems including:
1) A database is an organized collection of data stored and accessed electronically with database management system software. It consists of tables, rows, columns and stores large amounts of information.
2) A database management system is software that allows users to create and manage databases, and provides tools to store, organize and analyze data.
3) Data models such as hierarchical, network, relational and entity relationship models define how data is structured and related in a database.
The document discusses key concepts related to database systems including:
1) A database is an organized collection of data stored and accessed electronically with database management system software. It consists of tables, rows, columns and stores large amounts of information.
2) A database management system is software that allows users to create and manage databases, and provides tools to store, organize and analyze data.
3) Data models such as hierarchical, network, relational and entity relationship models define how data is structured and related in a database.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 10
CHAPTER 1 (DATABASE SYSTEM) Secondary Data Manage large quantity of
Collected by someone other than information
actual user Safety of the information stored DATABASE Books, journals, newspaper Avoid possible anomalous results Orgaznized collection of information COMPARE Organized into tables, rows, DATABASE SCHEMA, MODEL DATA INFORMATION columns AND INSTANCES Relies on data Does not rely on Operate a large amount of Design of a database information information by storing Represents the logical view Difficult to Easy to Server Helps the database users to understand data understand understand the relationship information between data INFORMATION Data that is processed, organized Meaningless on its Always meaningful Helps in the decision-making own process Unprocessed and Process and Data into a meaningful form unstructured structed EXP: Pay slip, reports, worksheets DATA COLLECTION METHODS DATA COLLECTION Questionnaire METHODS Interviews Primary Data Focus Group Directly from first-hand source Observation Qualitative & Quantitative Experimental PURPOSE OF DATABASE DATA MODELS Logical design and structure KEY COMPONENTS OF Stored Procedures and Functions How data will be stored, accessed DATABSE SCHEMA Predefined set of queries or a mini- and updated Tables program that one can save and Database and consist of rows reuse Hierarchical Model (records) and columns (attributes) Security Permissions Data into a tree-like-structure Columns (Attributes) Access control mechanisms that Single root, to which all other data Constraints of the data it can regulate user privileges and is linked contain (integer, string, date, permissions Boolean) Constraints DATABASE INSTANCE Conditions enforced on the data Database at a particular moment within the database to maintain of time data integrity and consistency Defines the attributes in tables that Relationship belong to a particular database Associations and dependencies between tables in the database schema Indexes By providing fast lookup and retrieval mechanisms Views Virtual tables derived from one or more base tables Network Model Allowed to have more than one Relational Model Internal Schema parent node Organized in two-dimensional Describe the physical storage Accessing the data is also easier tables and the relationship structure of the database and fast Information related to a particular type is stored in rows of that table
Entity Relationship Model
Dividing object of interest into entity and its characteristics into attributes DATABASE 3-SCHEMA Entities are related using ARCHITECURE relationships External Schema View level includes a number of external schemas or user views Conceptual Schema Describe the whole database for community user. Concentrating on describing entities, data types, relationship, user operations and constraints DATABASE MANAGEMENT HARDWARE Collection of facts stored in the SYSTEM (DBMS) Refers to the physical parts of the database DBMS computer and it also includes some Includes structure data, non- System software for creating and various storage structural data, logical data managing databases Most visible part of any Most important component of the Systematic way to create, retrieve, information system database management system update and manage data Actual computer system used for EXP: what is the size of the name, Software keeping and accessing the is it stored as related data to some database other data Run on the range of machines from microcomputers to mainframes PROCEDURES General instructions to use a SOFTWARE database management system A collection or set of programs, Manage databases, to take instructions that tell a computer backups, generating reports what to do Used for data validation, access Includes the database software, control, or to reduce network operating system, network traffic between clients software Help guide users to the operation Capable of understanding the and management of database Database Access Language and systems converts it into actual database commands to execute EXP: MySQL, PostgreSQL, Microsoft Access, SQL Server, FileMaker DATA DATABASE ACCESS Database administrator-database DISADVANTAGES LANGUANGE administrator is the one who 1. Complexity Simple language that allows users manages the complete database 2. Size to write commands to perform the management system 3. Performance desired operations on the data 4. Higher impact of a failure Used to write commands to access, 5. Cost of DBMS upsent, and delete data stored in a FUNCITION OF DBMS database 1. Data Dictionary Management Users can create new databases, 2. Data Storage Management BIG DATA tables, insert data implements 3. Data Transformation and Used for denoting a collection of database schema at the physical, Presentation datasets that is large and complex, logical and external level 4. Security Management making it very difficult to process 5. Multiuser Access Control Enormous amounts and various types of data that is collected for USER certain purpose Control and manage the databases ADVANTAGES and perform different types of 1. Controlling Redundancy operations 2. Integrity can be enforced CHARACTERISTIC Include database administrator, 3. Data can be shared Variety software developer and End user 4. Inconsistency can be avoided Veracity Database administrator-database 5. Providing Backup and Recovery Value administrator is the one who Volume manages the complete database Velocity management system End users are the one who store, retrieve, update CHAPTER 2 (DATA MODELLING) KEYS An attribute or a group of
ENTITY RELATIONSHIP attributes that can uniquely
DIAGRAM (ERD) identify each record in a table
a data modeling technique used in
software engineering to produce a UESE OF DATABSE KEYS
conceptual data model. Identify each record in the tables.
Multivalued Attribute: Have more Define Relations between the
COMPONENTS OF ERD than one value. tables.
Entities (names) Example: One teacher can teach Establish Relations between the Attributes (names) many subjects. tables. Relationships (verb/kata kerja) Derived Attributes: can be derived from other attributes. TYPES OF KEYES FUNCTION AND SYMBOLS OF Primary Key: column or group of ERD columns in a table that uniquely identify every row in that table. Example: Rules: dua barisan tidak boleh ada primary key yang sama Setiap barisan perlu ada primary key Tempat primary key tidak boleh DATABASE NORMALIZATION dibiarkan kosong. database design principle for Example: organizing data in an organized and consistent way. (digunakan untuk menyusun data secara teratur.) avoid redundancy and maintain the integrity of the database. PROBLEM WHEN DON’T Composite Key: combination of two or NORMALIZE more columns Insertion Anomaly Example: Update Anomaly 3 NORMAL FORMS First Normal Form (1NF) ensures there are no repeating Foreign Key: column that creates a entries in a group. relationship between two tables. each record must be unique. Purpose is maintaining data Second Normal Form (2NF) integrity apply to all the 1NF Example: requirements. data must have only one primary key. all subsets of data that can be CHAPTER 3 STRUCTURED QUERY are used to identify database placed in multiple rows should be LANGUAGE (SQL) object such as table, view and placed in separate tables. SQL indexes names as well as columns. Third Normal Form (3NF) (SQL) is a computer language for An identifier must start with a comply with all the 2NF management of databases and data letter. requirements. manipulation. It cannot contain embedded spaces data in a table must only be used to query, insert, update and (blanks). dependent on the primary key. modify data in a database. It cannot be more than 128 BENEFITS OF DATA SQL ALLOWS TO: characters. NORMALIZATION SQL can delete records from a More space: frees up much-needed database. gigabyte and terabyte space. SQL can create new databases. Faster question answering SQL can create new tables in a Better segmentation: best ways to grow database. a business is to ensure lead SQL can create stored procedures in a DATA TYPES segmentation. database. Type of data/ value an object can SQL can create views in a database. hold or process in known as its Data Type. SQL FUNDAMENTAL SQL DATA TYPES IDENTIFIER Exact numeric data type: integer Commands in DDL: value; number without a decimal CREATE: Use to make new RENAME: Use to change the point database. Use to make new table name of a table in a database DECIMAL, SMALLINT, INT, BIGINT Approximate numeric data type: Data Manipulation Language numbers with decimal point DROP: Use to delete a database (DML) FLOAT, REAL object. which is used to add, delete or Date and time data type: Store date Note: Once something is deleted, modify data in a database. and time cannot be recovered used to manage or manipulate DATE, TIME, DATETIME data in a table. String data type: text such as a Commands in DML: sentence or a word or any other SELECT: select a set of data related data. ALTER: modify the structure of a or information from a table. CHAR & VARCHAR table or database. Data Definition Language (DDL) >>Syntax to add a new column in computer language basically a INSERT: Used to add new a table: component of SQL, which is used to records or rows to a table create and modify the structure of database objects in a database. >>Syntax to rename a column in a It is also known as Data Description table: UPDATE: Used to change or modify data in a table DELETE: Used to delete a record or a data in a table.
Data Query Language (DQL)
which is used to perform queries on the data within database objects. It is used to retrieve information stored in the tables in a database. SELECT command: Retrieve information