Beruflich Dokumente
Kultur Dokumente
Data Modeling
Database: A collection of related data. Data: Known facts that can be recorded and have an implicit meaning.
An integrated collection of more-or-less permanent data.
Mini-world: Some part of the real world about which data is stored in a database. For example, student grades and transcripts at a university. Database Management System (DBMS): A software package/ system to facilitate the creation and maintenance of a computerized database. Database System: The DBMS software together with the data itself. Sometimes, the applications are also included.
ADBMS Lecture Notes 1: Prepared by Engr. Cherryl D. Cordova, MSIT 2
File terms
Record data items related to a single logical entity (e.g. a students information) or row in a table Field a place for a data item in a record (first name field in a student record) or a column in a table File a sequence of records of the same type (the table)
ADBMS Lecture Notes 1: Prepared by Engr. Cherryl D. Cordova, MSIT 5
File structures
A file: STUDENT
ID Last 3 1 record 2 4 Smith Wood Kent Boone field
Grade A C B B
Chuck Dan
File organization
Serial
new records appended
Sequential
records ordered in file, usually according to a numeric key
File structures
Serial
list of entries in which the order of entry into the list determines the order of the list
ID Last First Grade 3 Smith Jane A 1 2 4 Wood Kent Boone Bob Chuck Dan C B B
File structures
Sequential
list of entries ordered in some way (e.g. numerically or alphabetically)
Data Modeling
It is essential to building a good database. refers to the process where by data is structured and organized. Once data is structured, it is usually then implemented into what is called a database management system. The main idea behind these systems to manage vast amounts of both structured and unstructured data.
ADBMS Lecture Notes 1: Prepared by Engr. Cherryl D. Cordova, MSIT 11
Unstructured data include documents, word processing, e-mail messages, pictures, and digital video and audio files. Structured data, what is needed to make a data model (via a data model theory), is found in management systems like relational databases.
Data Model
representations of different entity classes that a company wants to possess information about, containing the specifics behind that information, and the relationship among the differing entities and attributes.
12
Both the blueprint and the foundation A representation of reality, a way to graphically plot your data requirements A visual model of what your database can look like when you get it implemented. the hardest and most important activity in the RDBMS world. If you get the data model wrong, your application might not do what users need, it might be unreliable, it might fill up the database with garbage.
13
14
16
17
18
Student
Instructor
ID
Department
19
Disadvantages
must establish the types of search prior to development of the hierarchical structure
20
21
Student
Instructor
ID
Department
22
Disadvantages
Complex restructuring can be difficult because of changing all the pointers
23
Stores both
Data about real world objects (entities) in tables Relationships between the tables
24
Relational database
Fields (columns) in the table store attributes.
Each attribute has a specific domain.
25
Terms
Table A collection of relevant data relating to one type of real world objects. Column A specific place for one type of data relating to one type of real world objects. Domain Set of all possible values for a specific column. Row Collection of data describing one real world object. Primary Key Columns, which are part of the row and uniquely identify any one row.
ADBMS Lecture Notes 1: Prepared by Engr. Cherryl D. Cordova, MSIT 26
Records
Each record represents a logical entity (e.g. a student) Each field represents an attribute of the logical entity
Student StudID Last First Grade Section 1 Wood Bob C IST357 2 3 4 Kent Smith Boone Chuck Jane Dan B IST115 A IST357 B IST357
27
Keys
Each table has a primary key, one field (or a combination of fields) that has a unique value for each and every record in the table
Student StudID Last First Grade Section 1 Wood Bob C IST357 2 3 4 Kent Smith Boone Chuck Jane Dan B IST115 A IST357 B IST357
StudID is the primary key in this table (two students may share either a last or first name)
28
Relating tables
Tables can be related (joined) together based on their keys The idea is to decompose into separate tables with no redundancy and to provide a capability to reassemble with no information loss
Student
StudID Last First Grade Section
Class
Section #Stud Instructor
1 2 3 4
48
Jones
29
Relating tables
Primary key Foreign key Primary key
Student Class StudID Last 1 2 3 4 Wood Kent Smith Boone First Grade Section Bob Chuck Jane Dan C IST357 B IST115 A IST357 B IST357 Section IST357 IST115 IST20 #Stud Instructor 48 Jones 120 Brower 120 Mennis
30
Relating tables
Student
StudID Last First Grade Section
Class
Section #Stud Instructor
1 2 3 4
IST20
120 Brower
332 517
31