100 likes | 109 Views
This article explores the concepts of file and data representation, file organization, and database processing. It covers topics such as bits and bytes, EBCDIC and ASCII encoding, field and record concepts, file organization methods (sequential, indexed sequential, direct), and file processing types (batch, immediate, online, offline). The article also explains the basics of database management systems (DBMS), including subsystems, DDL, DML, and logical structures. Additionally, it discusses relational database concepts, views, schemas, subschemas, and normalization principles.
E N D
File and data base concepts DB design
DATA REPRESENTATION bits and bytes EBCDIC and ASCII • CONCEPTS field or data element record file or table data base • FILE ORGANIZATION sequential indexed sequential direct • FILE PROCESSING batch vs immediate online vs offline File Concepts
In city In state DB: a set of entities and relations Street Cities States located Registered on in Cars In country Houses Occupied Owned by Has by color Citizen of Colors Persons Countries Country of origin
DBMS DB: subsystems DDL User OS DBM Data DML Base Application program DB logical structures: hierachical network relational
Views, Schema and Subschemas 1 2 5 4 7 9 10 8 15 12 17 13
how to represent entities and relations Flat files ... COLOR WEIGHT PROJ# PROJNAME S# QTY P# PNAME PROJ# DB Design concepts: STATUS S# CITY SNAME DB tables graphical STATUS S# SNAME CITY S FIELDS: P COLOR WEIGHT P# PNAME keys and atributes primary and foreign keys PROJ# J PROJNAME CITY QTY PROJ# O P# S# relational notation S ( S#, SNAME,STATUS,CITY) P ( P# ,PNAME,COLOR,WEIGHT) J ( PROJ# ,PROJNAME,CITY) O ( S#,P#,PROJ# ,QTY)
RELATIONS: one-to-one one-to-many many-to-many Entities and relations Product a supplier can provide project product can a product can use be part of can have Project Supplier a supplier can supply a project can have
NORMALIZATION: 1. represent each ENTITY as a TABLE 2. select the PRIMARY KEY 3. assign entity ATTRIBUTES to FIELDS 4. represent an ONE-TO-MANY relation by a FOREIGN KEY in the MANY table. 5. represent MANY-TO MANY relations as a NEW TABLE. Use FOREIGN KEYS to identify entities involved. The combination of foreign keys is the PRIMARY KEYof the new table. Assign the common attributes to fields. DB Design principles
many many Product a supplier DB design example can provide project product can a product can use be part of can have many many Project Supplier a supplier can supply many a project many can have S (S#,SNAME,STATUS,CITY) P (P#,PNAME,COLOR,WEIGHT) J (PROJ#,PROJNAME,CITY) O (S#,P#,PROJ#,QTY)