Computer Science, asked by siphalimishra1608, 13 hours ago

Write SQL to create and enter 10 records in a Patient table having attribute (Patient ID (PK), Patient name, Patient type, Doctor ID, Patient treatment, Date registered).​

Answers

Answered by NainaRamroop
4

SQL FOR THE GIVEN QUESTION IS as follows because it is a straightforward language to be understood by anyone if you want we can see how to use the foreign key as a primary key

Create table laboratory

(

  lab_no int PRIMARY KEY,

  patient_id  int,

  doctor_id  int,

  date    date,

  amount int NOT NULL CHECK (amount >0),

  FOREIGN KEY (patient_id) REFERENCES patient(patient_id),

  FOREIGN KEY (doctor_id) REFERENCES doctor(doctor_id)

);

at last, we need to find that this is the easiest and most understandable language it is mostly used in hospitals and pharmacies for keeping the records of patients and their visitors. a proper database is being managed with the help of these and can be accessed easily whenever required.

#SPJ1

Answered by amanpanday2811
0

Answer:

Writing SQL

Explanation:-

Structured Query Language-  Abbreviated as SQL (listen) S-Q-L, sometimes  "sequel" for historical reasons),is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is particularly useful in handling structured data, i.e. data incorporating relations among entities and variables. SQL offers two main advantages over older read–write APIs such as ISAM or VSAM. Firstly, it introduced the concept of accessing many records with one single command. Secondly, it eliminates the need to specify how to reach a record, e.g. with or without an index.

Database System- Originally based upon relational algebra and tuple relational calculus, SQL consists of many types of statements,  which may be informally classed as sublanguages, commonly: a data query language (DQL),[a] a data definition language (DDL),[b] a data control language (DCL), and a data manipulation language (DML). The scope of SQL includes data query, data manipulation (insert, update, and delete), data definition (schema creation and modification), and data access control. Although SQL is essentially a declarative language (4GL), it also includes procedural elements. SQL was one of the first commercial languages to use Edgar F. Codd’s relational model. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks". Despite not entirely adhering to the relational model as described by Codd, it became the most widely used database language SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987. Since then, the standard has been revised to include a larger set of features. Despite the existence of standards, most SQL code requires at least some changes before being ported to different database systems.

For more refers to-

https://brainly.in/question/33907792?referrer=searchResults

https://brainly.in/question/31936015?referrer=searchResults

#SPJ2

Similar questions