A constitution is a set of fundamental principles or established precedents according to which a state or another organization is governed. [Definition by New Oxford American Dictionary]. When these principles are written down into a single collection or set of legal documents, those documents may be said to comprise a written constitution. A treaty which defines how that organization is constituted is also called a constitution.

The longest written constitution of any sovereign country in the world is the Constitution of India. it is written in English-language translation. It constitutes 444 articles in 22 parts 12 schedules and 118 amendments. There are total 146,385 words in the constitution of India. With 10 chapters, 97 articles, and a total of 3,814 words, Constitution of Monaco is the shortest written constitution. The Earliest use of some code of justice goes to Iraq, where it allowed some rights to his citizens like a relieved tax for widows and orphans and protection the poor from the usury of the rich. This code was found in excavations of this country by an archaeologist Ernest Choquin de Sarzec in 1877. This code was issued by Sumerian king Urukagina of Lagash ca 2300 BC.

Later many governments ruled by special codes of written laws. The oldest such document still known to exist seems to be the Code of Ur-Nammu of Ur ca 2050 BC. Some of the better-known ancient law codes include the code of Lipit-Ishtar of Isin, the code of Hammurabi of Babylonia, the Hittite code, the Assyrian code and Mosaic law. [ Source : Wikipedia].

The San Marino constitution of 1600
If we talk about the oldest written constitution still governing a sovereign nation today, then it goes to Republic of San Marino. The document was based upon the Statuti Comunali (Town Statute) of 1300, itself influenced by the Codex Justinianus, and it remains in force today [Source : Wikipedia]. The six book constitution was written in Latin in the year 1600. The first book containing 62 articles describing the court's, administrative positions, the various councils of San Marino and the powers assigned to them. THe last two articles includes how the law is to be promulgated and is to be interpreted and altered. The second book contains 75 articles and called Civilium Causarum. The first half of the book provides civil law procedures and judicial expenses. The second half contains salaries, education and wills. There are two other sections as well which promotes compromise to resolve disputes and regulates the salary of lawyers. The third book covers criminal law, contains 74 articles and called Maleficiorum. A punishment shall be proportional to the offense and any mitigating circumstances is a formula provided by the laws in this book. The fourth book is called De Appellationibus. It contains 15 articles and mainly explains how judges are nominated. The fifth book called Extraordinarium contains 46 articles including the sale of meat, sanitation and health, water reserves and roads. The sixth book covers compensation, weights and plant cultivation.