Professional Documents
Culture Documents
1 2
Internal Internal
Physical • 2. It hides the physical storage details from users.
representation of
level Schema – Users should not have to deal with physical database storage details. They
the database
should be allowed to work with the data itself, without concern for how it
Physical is physically stored.
data Database
organisation • More ...
3 4
• The conceptual schema describes all the data items and relationships
Struct STAFF { between them, together with integrity constraints (later).
int StaffNo;
int BranchNo;
– There is only one conceptual schema per database.
char Fname[15];
Internal Level char Lname[15]; • At the lowest level, the internal schema contains definitions of the
struct date DateOfBirth; stored records, the methods of representation, the data fields, and
float Salary;
struct STAFF *next; // pointer to next record
indexes.
};
– There is only one internal schema per database.
9 10
11 12
Notes on the Example Data Independence -I
• The two external views are based on the conceptual view. • A major objective of the ANSI-SPARC architecture is to provide data
– The Age field is derived from the DOB (Date of Birth) field.
independence meaning that upper levels are isolated from changes to
lower levels.
– The Sno field is mapped onto the StaffNo field of the conceptual record.
• There are two kinds of data independence:
• The conceptual level is mapped onto the internal level.
• Logical data independence refers to the immunity of external schemas
• The internal level contains a physical description of the structure for to changes in the conceptual schema.
the conceptual record expressed in a high-level language. – Changes to the conceptual schema (adding/removing entities, attributes, or
relationships) should be possible without having to change existing
• Note that the order of the fields in the physical structure is different external schemas or rewrite application programs.
from that of the conceptual record.
• Physical data independence refers to the immunity of the conceptual
• The physical structure contains a “pointer”, next. This will be simply schema to changes in the internal schema.
the memory address at which the next record is stored. Thus the set of – Changes to the internal schema (using different storage structures or file
staff records may be physically linked together to form a chain. organisations) should be possible without having to change the conceptual
or external schemas.
13 14
• That is, they allow the user to specify what must be done without – A manipulative part, defining the types of operations that are allowed on
saying how it should be done. the data.
– This is very different from using a conventional language like Java (a – Possibly a set of integrity rules, which ensure that the stored data is
3GL) in which you have to specify how to do things. accurate.
– With a 4GL, the how part is determined by the system. • Many data models have been proposed over the years.
• Thus, 4GL tools are usually generators or wizards of some sort. – Some are used to describe data at the external and conceptual levels, while
others describe data at the internal level.
– It is a bit like having your program written automatically.
– Some have greater success than others in hiding from end-users the
• Examples include: underlying details of the physical storage of data.
– Form/Report generators
– Application generators
19 20
21 22